User superman reports that Discourse connects successfully to the SMTP server (mail.forum.domainname.com on port 587) but fails to send registration emails, despite exim4 working independently and no errors in its logs. pfaffman suggests checking mail server logs and configuring exim4 properly, noting potential issues with sender address validity or domain mismatch. DBHacker asks if the container was rebuilt and advises checking SMTP environment variables via the Rails console. superman confirms credentials and rebuild were correct, questioning whether the SMTP address should include “mail” and whether Discourse’s sending hostname is causing the issue. pfaffman suspects a mismatch between the forum hostname and the mail server’s expected domain. superman seeks clarification on Discourse’s actual sending hostname. codinghorror clarifies that by default, Discourse uses email@forum.somedomain.com, which often trips users expecting email@somedomain.com. The core issue appears to be domain or sender address configuration mismatches between Discourse and the mail server.
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
Exim4 was tested to verify it sends and receives emails.
Discourse was rebuilt with discourse-setup, using all the correct credentials:
Hostname : forum domainname com
Email : user@test com
SMTP address : mail forum domainname com
SMTP port : 587
SMTP username : postmaster@forum domainname com
SMTP password : password
Then, discourse-doctor is run to test weather Discourse can send email from the local exim4 mail server.
Discourse-doctor says:
“SMTP server connection successful.”
“Sending mail failed.”
However, there are no errors in the exim4 log.
Why does sending mail fail?
Is this a common problem?
Notice that the SMTP address is: mail forum domainname com,
should it have “mail” at the beginning?
Discourse-doctor says that Discourse does connect to:
mail forum domainname com,
but Discourse does not send the email.