Discourse connects to the SMTP server but fails to send email through it

Cant get the first user registration email:

Discourse doctor says:
SMTP server connection successful.
Sending mail failed.

However:
Telnet to mail.domain.com port 587 works and EHLO mailserver command works.

How can I fix this, any help would be greatly appreciated.

You might look at the mail server logs. Whatever error it is isn’t sometime that v Discourse-doctor understands.

After running discourse-doctor, the Exim4 mainlog reveals the following, how can it be fixed?:

2020-12-30 05:21:28 1ku59B-0006Ne-Kx Message is frozen
2020-12-30 05:21:28 1ku5Ob-0007sS-P2 Message is frozen
2020-12-30 05:21:28 1ku5eH-0001ER-4C Message is frozen
2020-12-30 05:21:28 1ku4Of-0001OQ-9k Message is frozen
2020-12-30 05:21:28 1ku5Ew-00079G-4b Message is frozen
2020-12-30 05:21:28 1ku58a-00064t-GR Message is frozen
2020-12-30 05:21:28 1ku58I-0005vf-2m Message is frozen
2020-12-30 05:21:28 1ku59A-0006Ie-94 Message is frozen
2020-12-30 05:21:28 1ku5B4-0006rS-2o Message is frozen
2020-12-30 05:21:28 1ku59B-0006LN-2b Message is frozen
2020-12-30 05:21:28 1ku5Jl-0007Wj-CP Message is frozen
2020-12-30 05:21:28 1ku59r-0006R9-1k Message is frozen
2020-12-30 05:21:28 1ku4Ni-0001HH-BC Message is frozen
2020-12-30 05:21:28 1ku4XO-0002h5-EB Message is frozen
2020-12-30 05:21:28 End queue run: pid=7198

You’ll need to Google how to configure exim4.

From 7. The default configuration file

Freezing occurs when a bounce message encounters a permanent failure because the sender address of the original message that caused the bounce is invalid, so the bounce cannot be delivered.

My guess is that you need to change the notification email address or configure exim to use your subdomain

1 Like

The discourse-doctor reveals that discourse is attempting to test send emails using the wrong mail server domain.

The correct mail server is mail.subdomain.domain.com
The one that discourse-doctor is sending to is: mail.domain.com.

Why is discourse ignoring the subdomain when the subdomain is not missing in the app.yaml file?

Any help would be greatly appreciated.

Did you forget to rebuild your container?

Anyway, you can check your container by:

docker exec -it app rails c

Then, from the rails console:

[1] pry(main)>ENV

You can look at all your SMTP environmental variables easily.

2 Likes