Skip to content

Commit c670983

Browse files
committed
Configure tls_certificate_check for tls config in swoosh
OTP 26 changed the error level of what we're seeing when trying to send email to SES via TLS. This additional configuration should let us communicate via TLS without issues. See gen-smtp/gen_smtp#328
1 parent a1f712e commit c670983

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

config/runtime.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ if config_env() == :prod do
293293
password: System.fetch_env!("SMTP_PASSWORD"),
294294
ssl: System.get_env("SMTP_SSL", "false") == "true",
295295
tls: :always,
296+
tls_options: :tls_certificate_check.options(System.fetch_env!("SMTP_SERVER")),
296297
retries: 1
297298
end
298299
end

mix.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ defmodule NervesHub.MixProject do
9696
{:telemetry_metrics_statsd, "~> 0.7.0"},
9797
{:telemetry_poller, "~> 1.0"},
9898
{:timex, "~> 3.1"},
99+
{:tls_certificate_check, "~> 1.0"},
99100
{:x509, "~> 0.5.1 or ~> 0.6"}
100101
]
101102
end

mix.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"telemetry_poller": {:hex, :telemetry_poller, "1.0.0", "db91bb424e07f2bb6e73926fcafbfcbcb295f0193e0a00e825e589a0a47e8453", [:rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "b3a24eafd66c3f42da30fc3ca7dda1e9d546c12250a2d60d7b81d264fbec4f6e"},
7575
"thousand_island": {:hex, :thousand_island, "1.3.3", "d193a0e268f44a2d09efc6b2d8b39cf37fc65ce99fc421deca6260759d6eb204", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "adc328b15f10012769dcc3aeb14d4855790cd5ea34e4c6a701f334516084e750"},
7676
"timex": {:hex, :timex, "3.7.11", "bb95cb4eb1d06e27346325de506bcc6c30f9c6dea40d1ebe390b262fad1862d1", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.20", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.1", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "8b9024f7efbabaf9bd7aa04f65cf8dcd7c9818ca5737677c7b76acbc6a94d1aa"},
77+
"tls_certificate_check": {:hex, :tls_certificate_check, "1.22.1", "0f450cc1568a67a65ce5e15df53c53f9a098c3da081c5f126199a72505858dc1", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "3092be0babdc0e14c2e900542351e066c0fa5a9cf4b3597559ad1e67f07938c0"},
7778
"tzdata": {:hex, :tzdata, "1.1.1", "20c8043476dfda8504952d00adac41c6eda23912278add38edc140ae0c5bcc46", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "a69cec8352eafcd2e198dea28a34113b60fdc6cb57eb5ad65c10292a6ba89787"},
7879
"unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
7980
"websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"},

0 commit comments

Comments
 (0)