CRAM-MD5 Authentication for mail


#1

Hi,

the mailserver i’m using only supports authentication through CRAM-MD5, and from its logs I see that discourse tries to authenticating using SASL PLAIN nevertheless, and obviously not succedding.

Is there a way to set up discourse to authenticate with CRAM-MD5?

220 foobar.net ESMTP Postfix (Debian/GNU)
EHLO barfoo
250-foobar.net
250-PIPELINING
250-SIZE
250-VRFY
250-ETRN
250-AUTH CRAM-MD5
250-AUTH=CRAM-MD5
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
Jul 18 05:21:40 foobar postfix/smtpd[32209]: connect from unknown[82.195.73.13]
Jul 18 05:21:40 foobar postfix/smtpd[32209]: Anonymous TLS connection established from unknown[82.195.x.y]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
Jul 18 05:21:40 foobar postfix/smtpd[32209]: warning: unknown[82.195.x.y]: SASL PLAIN authentication failed: Invalid authentication mechanism
Jul 18 05:21:40 foobar postfix/smtpd[32209]: lost connection after AUTH from unknown[82.195.x.y]
Jul 18 05:21:40 foobar postfix/smtpd[32209]: disconnect from unknown[82.195.x.y]

POP3 Authentication with CRAM-MD5
(Matt Palmer) #2

Set the DISCOURSE_SMTP_AUTHENTICATION environment variable to cram_md5. I haven’t tested it, but from a quick rummage through the code, that should do the trick.