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.
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.
Did anyone succeed with OVH Email-Pro and Discourse?
I tried these:
DISCOURSE_SMTP_ADDRESS: pro2.mail.ovh.net
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: admin@mydomain.com
DISCOURSE_SMTP_PASSWORD: mypassword
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?
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_PORT: 587
DISCOURSE_SMTP_USER_NAME: postmaster@*******
DISCOURSE_SMTP_PASSWORD: "*********"
DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
DISCOURSE_SMTP_AUTHENTICATION: login
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
Tried switching to pro1.ovh… but I’m getting the same error 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.
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
got:
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 [185.56.211.110]
250-SIZE 104857600
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-**AUTH GSSAPI NTLM**
250-8BITMIME
250-BINARYMIME
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 ^^)
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?
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.