Reworking the emails:test rake task output

Yes.

But regardless, it would have worked. Without touching anything, STARTTLS would only be used if the server offered it.

The only situation where it ever needed to be explicitly disabled was where:

  • the server offers STARTTLS
  • mail sent WITHOUT using STARTTLS would work
  • mail sent WITH STARTTLS would fail
2 Likes

Probably true for most.

For us, we actually rely on an old email solution that doesn’t use STARTTLS for outgoing emails from internal systems (that is handled later in the chain) and since the documentation said `DISCOURSE_SMTP_ENABLE_START_TLS` is optional, but default true we sat this to false intentionally.

I can Dismiss this advise, but it just shows up again and other admins will wonder if there is something wrong with out setup (there isn’t; test mail works fine!). Is the advise intended to be so persistent?

DISCOURSE_SMTP_ENABLE_START_TLS will only use STARTTLS if the server offers it. If your mailserver doesn’t offer it, it won’t be used.

(this is referred to as opportunistic TLS)

My reason for adding the warning is that prior to my change, setting DISCOURSE_SMTP_ENABLE_START_TLS to false did not actually disable STARTTLS.

I envisioned there was a non-zero number of admins who had no idea how this worked and banged together variables until it did and happened to leave DISCOURSE_SMTP_ENABLE_START_TLS=false set, even though their setup required it. The warning is largely directed at those people.

1 Like

You’re right! I just tested and can confirm outbound email still works for us after the setting was removed. :+1:

1 Like