csmu was troubleshooting email delivery issues on a new Discourse instance using smtp.office365.com. Initially, they confirmed mail could be sent via swaks and telnet worked after setting a fully qualified domain name. No errors appeared in the production log, but a misleading log entry about “/var/log/exim4/mainlog” turned out to be a false positive csmu. The real solution involved: (1) ensuring the device had a valid FQDN for telnet to succeed; (2) configuring the Discourse YAML file correctly, especially setting DISCOURSE_SMTP_AUTHENTICATION: login along with proper address, port, username, password, and TLS; (3) updating the SiteSetting.notification_email via Rails console; and (4) restarting the container with ./launcher destroy web_only followed by ./launcher start web_only. After these steps, email functionality was restored.
csmu
(Keith John Hutchison - Ceiteach Seán Mac Úistin)
1
I am able to send mail from the device using swaks
I can telnet into the mail server smtp.office365.com 587 (after setting a fully qualified domain name)
Looks like no errors on the production log.
tail -f shared/web_only/log/rails/production.log
Started POST "/u/action/send_activation_email" for 115.64.14.90 at 2019-12-23 08:20:28 +0000
Processing by UsersController#send_activation_email as */*
Parameters: {"username"=>"csmu"}
Rendering text template
Rendered text template (Duration: 0.1ms | Allocations: 1)
Completed 200 OK in 36ms (Views: 1.0ms | ActiveRecord: 0.0ms | Allocations: 4557)
I see things like this
Cannot open main log file "/var/log/exim4/mainlog"
when I run tail -f shared/web_only/log/var-log/mail.log
Any ideas on why “/var/log/exim4/mainlog” would be locked out and referenced in shared/web_only/log/var-log/mail.log ?
csmu
(Keith John Hutchison - Ceiteach Seán Mac Úistin)
2