We’re trying to setup Discourse and are having problems setting up the mail part. Our mail server only supports digest_md5 and we’re trying to make Discourse use that authentication.
We found that Discouse uses ActionMailer::Base to send mails and that this mailer support 3 authentication methods:
:authentication - If your mail server requires authentication, you need to specify the authentication type here. This is a symbol and one of :plain (will send the password Base64 encoded), :login (will send the password Base64 encoded) or :cram_md5 (combines a Challenge/Response mechanism to exchange information and a cryptographic Message Digest 5 algorithm to hash important information)
So: plain, login et cram_md5
Is there a way to have Discourse authenticate against a mail server accepting digest_md5?
Yes we have tried this authentication method. We first got the following
Apr 14 11:43:29 xxxxxxx postfix/smtpd[17754]: lost connection after STARTTLS from discourse.xxxx[XX.XXX.XX.XX]
Apr 14 11:43:29 xxxxxxx postfix/smtpd[17754]: disconnect from discourse.xxxx[XX.XXX.XX.XX]
Apr 14 11:43:29 xxxxxxx postfix/smtpd[17756]: lost connection after STARTTLS from discourse.xxxx[XX.XXX.XX.XX]
So I have changed the value of DISCOURSE_SMTP_ENABLE_START_TLS to false in the discourse app.yml file and I rebuiled it. Then, we got the following in our postfix server logs:
Apr 14 12:02:30 xxxxxxx postfix/smtpd[17754]: connect from discourse.xxxx[XX.XXX.XX.XX]
Apr 14 12:02:30 xxxxxxx postfix/smtpd[17754]: warning: discourse.xxxx[XX.XXX.XX.XX]: SASL LOGIN authentication failed: Invalid authentication mechanism
Apr 14 12:02:30 xxxxxxx postfix/smtpd[17754]: lost connection after AUTH from discourse.xxxx[XX.XXX.XX.XX]
Apr 14 12:02:30 xxxxxxx postfix/smtpd[17754]: disconnect from discourse.xxxx[XX.XXX.XX.XX]