Installing Discourse with digest_md5 mail authentication

AI 生成的摘要

The discussion revolves around installing Discourse with digest_md5 mail authentication. vmassol initially inquired about setting up Discourse to work with a mail server that only supports digest_md5 authentication. zogstrip suggested trying the “login” authentication method, which kevinwaro had already attempted, resulting in an error. kevinwaro tried disabling DISCOURSE_SMTP_ENABLE_START_TLS and rebuilding the app, but still received an “Invalid authentication mechanism” error when attempting SASL LOGIN authentication.

Hi,

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?

Thanks

I think “login” is what you’re looking for. Have you tried that?

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]

Thanks for your reply @zogstrip ! I’ve let Kevin reply since he’s the one who did the setup.