E-Mails cannot be send when SMTP and STARTTLS is used (OTP26, OTP25 is fine)

I thought that posting here might help me out with some E-Mail stuff

First some stuff on my system:
OS: Arch Linux (but also tested on my old still running instance running Ubuntu)
Elixir-Version: Erlang/OTP 26 [erts-14.0.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit:ns] Elixir 1.15.0 (compiled with Erlang/OTP 26)
Release: stable-branch from source

I have the config in the database and normally configure stuff via Admin-FE.

have a look at the error first I guess. It seem to be trying to send the E-Mail like ten times and then errors out after to many retries and mentioned that TLS failed. (I stripped the From and TO Mail-Adresses)

15:34:14.119 [debug] QUERY OK source="config" db=13.3ms decode=0.9ms queue=50.9ms idle=0.0ms
SELECT c0."id", c0."key", c0."group", c0."value", c0."inserted_at", c0."updated_at" FROM "config" AS c0 []

15:34:14.243 [debug] Headers: [
  {"Content-Type", "text/html; charset=\"utf-8\""},
  {"From", "\"LightNovel Akkoma\" <*>"},
  {"To", "*"},
  {"Subject", "Instance Test Email"},
  {"MIME-Version", "1.0"}
]

15:34:14.249 [debug] Headers: [
  {"Content-Type", "text/html; charset=\"utf-8\""},
  {"From", "\"LightNovel Akkoma\" <*>"},
  {"To", "*"},
  {"Subject", "Instance Test Email"},
  {"MIME-Version", "1.0"}
]

15:34:14.249 [debug] Headers: [
  {"Content-Type", "text/html; charset=\"utf-8\""},
  {"From", "\"LightNovel Akkoma\" <*>"},
  {"To", "*"},
  {"Subject", "Instance Test Email"},
  {"MIME-Version", "1.0"}
]

15:34:14.250 [debug] Headers: [
  {"Content-Transfer-Encoding", "quoted-printable"},
  {"MIME-Version", "1.0"},
  {"Subject", "Instance Test Email"},
  {"To", "*"},
  {"From", "\"LightNovel Akkoma\" <*>"},
  {"Content-Type", "text/html; charset=\"utf-8\""}
]

15:34:14.251 [debug] Headers: [
  {"Content-Transfer-Encoding", "quoted-printable"},
  {"MIME-Version", "1.0"},
  {"Subject", "Instance Test Email"},
  {"To", "*"},
  {"From", "\"LightNovel Akkoma\" <*>"},
  {"Content-Type", "text/html; charset=\"utf-8\""}
]

15:34:14.254 [debug] Headers: [
  {"Date", "Fri, 22 Sep 2023 15:34:14 +0200"},
  {"Content-Transfer-Encoding", "quoted-printable"},
  {"MIME-Version", "1.0"},
  {"Subject", "Instance Test Email"},
  {"To", "*"},
  {"From", "\"LightNovel Akkoma\" <*>"},
  {"Content-Type", "text/html; charset=\"utf-8\""}
]

15:34:14.254 [debug] Headers: [
  {"Date", "Fri, 22 Sep 2023 15:34:14 +0200"},
  {"Content-Transfer-Encoding", "quoted-printable"},
  {"MIME-Version", "1.0"},
  {"Subject", "Instance Test Email"},
  {"To", "*"},
  {"From", "\"LightNovel Akkoma\" <*>"},
  {"Content-Type", "text/html; charset=\"utf-8\""}
]

15:34:14.255 [debug] Headers: [
  {"Message-ID", "<26c77c1490ba6ca863273b16ca52519c@dungeon-server>"},
  {"Date", "Fri, 22 Sep 2023 15:34:14 +0200"},
  {"Content-Transfer-Encoding", "quoted-printable"},
  {"MIME-Version", "1.0"},
  {"Subject", "Instance Test Email"},
  {"To", "*"},
  {"From", "\"LightNovel Akkoma\" <*>"},
  {"Content-Type", "text/html; charset=\"utf-8\""}
]

15:34:14.255 [debug] Headers: [
  {"Message-ID", "<26c77c1490ba6ca863273b16ca52519c@dungeon-server>"},
  {"Date", "Fri, 22 Sep 2023 15:34:14 +0200"},
  {"Content-Transfer-Encoding", "quoted-printable"},
  {"MIME-Version", "1.0"},
  {"Subject", "Instance Test Email"},
  {"To", "*"},
  {"From", "\"LightNovel Akkoma\" <*>"},
  {"Content-Type", "text/html; charset=\"utf-8\""}
]

15:34:14.256 [debug] Headers: [
  {"Message-ID", "<26c77c1490ba6ca863273b16ca52519c@dungeon-server>"},
  {"Date", "Fri, 22 Sep 2023 15:34:14 +0200"},
  {"Content-Transfer-Encoding", "quoted-printable"},
  {"MIME-Version", "1.0"},
  {"Subject", "Instance Test Email"},
  {"To", "*"},
  {"From", "\"LightNovel Akkoma\" <*>"},
  {"Content-Type", "text/html; charset=\"utf-8\""}
]

15:34:14.258 [debug] Headers: [
  {"Content-Type", "text/html; charset=\"utf-8\""},
  {"From", "\"LightNovel Akkoma\" <*>"},
  {"To", "*"},
  {"Subject", "Instance Test Email"},
  {"MIME-Version", "1.0"},
  {"Content-Transfer-Encoding", "quoted-printable"},
  {"Date", "Fri, 22 Sep 2023 15:34:14 +0200"},
  {"Message-ID", "<26c77c1490ba6ca863273b16ca52519c@dungeon-server>"}
]
** (MatchError) no match of right hand side value: {:error, {:retries_exceeded, {:temporary_failure, ~c"46.38.226.23", :tls_failed}}}
    (pleroma 3.10.4-1-gebfb617b) lib/mix/tasks/pleroma/email.ex:24: Mix.Tasks.Pleroma.Email.run/1
    (mix 1.15.0) lib/mix/task.ex:447: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.15.0) lib/mix/cli.ex:92: Mix.CLI.run_task/2

What I configured in Admin-FE in text since I can’t post screenshosts. (Obv I used the correct Username/Password)

Mailer Enabled: Yes
Adapter: SMTP
Relay: lightnovel-dungeon-de.netcup-mail.de (as given by my Mail-provider)
Port: 587
Username:
Password:
Use SSL: No
STARTTLS Mode: always
AUTH Mode: always
Retries: Not changed from default

I am fairly certain I configured stuff how my E-Mail Provider wants it. The Provider BTW is netcup which also hosts the server.

I think I configured stuff correctly in Admin-FE. The Server, Username and password have to be correct as well since it works for other services that use the same SMTP for their Mail stuff, also I copied them over from my password-manager so there can’t be any error. I also can login with these credentials in the Webmail-Interface no problem. So I have trouble pinpointing the issue.

Just as a sanity-check I tried using Sparkpost. That one could send an E-Mail just fine after being configured correctly in Admin-FE, I would like to avoid using that service, since it adds tracking-pixels to Emails. Was also tested on the identical server btw.

All seems fine and correctly configured to me, but maybe I overlooked something obvious? If you need any more info let me know.

this may be of use

1 Like

Thanks for the pointer floaty.

Looking through the issues there I first tried the fixes suggested there, to no avail. There was a mention in the thread that it used to work just fine with OTP25.

Also I noticed you don’t really have full support for OTP26, as per stable release from 08.2023, so that might also have played its part.

Anyway for my solution was to downgrade to Erlang OTP25 and Elixir 1.14 (arch is kinda weird there seems to be no version of 1.15 compiled with OTP25) .

Thank you very very much for the pointer. E-Mail works in that config.