How to change the SMTP authentification method

My Discourse installation is unable to send emails to my SMTP server. With discourse-doctor, I have this error when trying to send an email (I have removed sensitive information):

Testing sending to … plain auth.
======================================== ERROR ========================================
                                    UNEXPECTED ERROR

503 AUTH command used when not advertised


====================================== SOLUTION =======================================
This is not a common error. No recommended solution exists!

I would like to change the authentification method from plain to login. But it does not seem I have a parameter for the authentification method in app.yml. I am using the Discourse image offered by DigitalOcean.

Can you help me change the authentification method used by SMTP?

You just need to add it. You should be able to find an example if you search.

1 Like

OK, I added:

DISCOURSE_SMTP_AUTHENTICATION: login

it now uses the login authentification method but I still have the same error.

1 Like

I made some research on the subject. And I am not alone having this kind of difficulty. It seems that Discourse is incompatible with some SMTP servers or at least, some configurations.

On StackOverflow, SMTP Error <<: 503 AUTH command used when not advertised, David Spector is referencing this blog post: Tuning cPanel TLS for SMTP incoming email reception.

It might be that Discourse is trying to authenticate before using SSL or STARTTLS. Is this a security issue? Is Discourse needing something to fix or is it a problem related to SMTP configuration? It is not clear to me.

Please share your thoughts.

There are some settings about that tls issue. Mail is hard. Discourse works with the major providers. My thought is that if you want things to be easy, use one of them.

1 Like