Discourse - SMTP from OVH


I’m using SMTP server from OVH. I created login, password and opened discourse-setup file. After all, I do rebuild, but Discourse still don’t send mails. I saw topic on meta, but change configuration still don’t help.

Can anyone help?

Sorry for my English

Use one of the recommended email services.

My guess is that the domain name you are using is not approved by the mail host. By defaul Discourse will send from the host name of the site. Mail server is probably set for example.com and Discourse is using forum.example.com. There is a line at the bottom of the configuration file to change it.

1 Like

Where? :thinking:

Yeah, mail serwer is smtp.example.com and I use forum.example.com

I managed to succeed with OVH, you have to add some things.

With a pro mail server (fr - uk)

  DISCOURSE_SMTP_ADDRESS: pro1.mail.ovh.net
  DISCOURSE_SMTP_USER_NAME: email@forum.com
  DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)
  DISCOURSE_SMTP_AUTHENTICATION: login  # (you need to add this line)

If you have a classic web hosting alongside the forum

  DISCOURSE_SMTP_USER_NAME: email@forum.com
  #DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)

But if you have a dedicated smtp server, can’t help, sorry

It should work

1 Like

It don’t work :face_with_thermometer:

What offer did you use with OVH to access a webmail account?

If you only have a vps, they don’t provide a smtp account

This is free webmail. I have this with domain.

Your forum is in https? The port can change if it’s not the case

1 Like


Should I change port? Whose port?

No, my examples are with forum on https.

You should contact OVH or check your guide in the webmail to know what smtp you have to put

Did anyone succeed with OVH Email-Pro and Discourse?
I tried these:

DISCOURSE_SMTP_ADDRESS: pro2.mail.ovh.net
DISCOURSE_SMTP_USER_NAME: admin@mydomain.com
DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)
DISCOURSE_SMTP_AUTHENTICATION: login  # (you need to add this line)

But I’m getting:
504 5.7.4 Unrecognized authentication type

when testing with ./discourse-doctor.

I’m using paid OVH Email-Pro account.

I’m losing faith that I’ll ever have a working Discourse install. I’ve tried numerous free email accounts and Discourse was never able to send emails with them. I even tried my own postfix, but no luck.
Does this work only with Mailgun? :frowning:

Works great with SendGrid.

Yes I still have a forum that runs with a ovh email pro account, it works well with these settings

  ## TODO: The SMTP mail server used to validate new accounts and send notifications
  DISCOURSE_SMTP_ADDRESS: pro1.mail.ovh.net
  DISCOURSE_SMTP_USER_NAME: postmaster@*******
  DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)

Maybe their settings change for the pro2 email server, but I doubt it. You can try with a false setting for enable start tls or another port, I’m sure it’s still doable.

If you want to make a few tests quickly, you don’t have a rebuild the app everytime. You can run

./launcher destroy app
./launcher start app

To update email settings

1 Like

Tried switching to pro1.ovh… but I’m getting the same error :frowning: I have no idea what can be wrong…I’m already getting mad, because I’ve tried so many different accounts, rebuilt the install so many times and not moving forward…

This is already a big help. Thanks a lot for this. Rebuilding takes a couple of minutes and changing even a single option meant a couple of minutes waiting. Now it’s a lot faster this way.

1 Like

Thanks. I’m running out of options and ideas. Perhaps I’ll try this just to see if my Discourse is able to work with any SMTP server. I start to doubt it as it doesn’t work with OVH for me, but it does for someone else…

One more question: could you please try to execute telnet to your OVH mail server?
I think this may have something to do with authentication expected by my OVH mail server.

I tried this:

    telnet pro2.mail.ovh.net 587


    220 pro2.mail.ovh.net Microsoft ESMTP MAIL Service ready at Sun, 17 Jan 2021 15:50:55 +0100
    EHLO mydomain-assigned-to-my-emailpro.pl
    250-pro2.mail.ovh.net Hello []
    250-SIZE 104857600
    250-**AUTH GSSAPI NTLM**
    250 CHUNKING

This makes me think, that my mail account in OVH has some authentication type which Discourse is unable to understand.
What do you get here when you try telnet to your server? do you get AUTH LOGIN or AUTH PLAIN perhaps?

EDIT: and one more question: do you have authoritative or non-authoritative email pro account? This may also matter I guess. I’ve got non-authoritative as I couldn’t configure my OVH mail in authoritative mode.

I can’t help much sadly because I don’t manage the ovh account for this forum, I just manage the server/discourse aspect of it. It was an account created a few years ago, my guess is that they changed a few settings in the email accounts since then. It might be a bit harder for new users.

But since I have access to the server, I ran the command. I don’t know if it helps, but here is what I’ve got

root@vps00000:~# telnet pro2.mail.ovh.net 587
Trying 37.59.xxx.xxx...
Connected to pro2.mail.ovh.net.
Escape character is '^]'.
220 pro2.mail.ovh.net Microsoft ESMTP MAIL Service ready at Sun, 17 Jan 2021 17:32:23 +0100
451 4.7.0 Timeout waiting for client input
Connection closed by foreign host.

(It may seem like I knew a lot about emails, but I’m a newbie, I just tried a bunch of stuff and managed to make it work on a few forums ^^)

I have no idea about OVH, sorry.

But I have installed Discourse on our own Ubuntu dedicated servers, on Linode slices, and on macOS and never had a problem with SMTP mail.

However, there can be a issue with SMTP mail inside a Docker container but that is a Docker configuration issue and not a Discourse issue, per se

Thanks a lot Steven for trying this.
However when you tried the telnet thing - I see you haven’t tried to enter the crucial command in order to get all the supported server features: EHLO
Could you please try again to telnet to this server and after it connects you type in:

EHLO pro1.mail.ovh.net + enter key?

Then the server will respond with a few lines starting with 250… and one of them will be a line with AUTH which lists supported authentication types. Actually I think this is more a server thing than a user thing, because when I tried this it replies before I even type in my user, but I’d still love to see what you get. If it turns out you’ll get the same as me then it’s gonna be a reall puzzle for me to understand why it works for you and why it doesn’t for me even though the OVH Email Pro authentication isn’t supported by Discourse? :thinking:

Another thing is that you typed pro2 and not pro1 as you initially indicated that your mail server is pro1. I know I can do the same, but I don’t know - maybe it works in another way based on IP geolocalisation? I’m a newbie to this as well.

Thanks in advance!