Having issues with Migadu emails

Hello,

I’m having issues with the setting up discourse to use my SMTP server (I’m using Migadu as my email server).

Here are the details I’m using:

DISCOURSE_SMTP_ADDRESS: "smtp.migadu.com"    
DISCOURSE_SMTP_USER_NAME: "community@kloclabs.com"
DISCOURSE_SMTP_PASSWORD: "<password>"
DISCOURSE_SMTP_ENABLE_START_TLS: true

These are the details that I use on my client and it works fine however it seems to have a problem with discourse.

When I run ./discourse-doctor I get the error:

500 Unrecognized command

Everything seems to be setup correctly, I can telnet to the SMTP server, not a problem.

Hope someone can help with this

1 Like

What host are you using?
have you tried defining a port? (587 or 2525 whatever your provider supports)

I’m hosting it myself on an OVH dedicated server.

Tried defining the port as 587, I have also added the following to the config:

DISCOURSE_SMTP_AUTHENTICATION: login

but still no luck, I have verified myself as an admin through the terminal and I am now getting a different error

550 From header does not match login user

That can’t be. You should be running ./discourse-doctor exactly the same way that you’re running ./discourse-setup. You’re running ./discourse-setup to set the SMTP stuff or are you editing app.yml by hand? Are you rebuilding (or ./launcher destroy app; ./launcher start app after you make changes?

I’m editing app.yml by hand because I’m using a reverse proxy. It looks like I need to change the from header in the email

Okay, looks to be sorted now. With Migadu you have to have a matching from header in the email along with authentication. Adding the authentication script above plus going to the Admin settings and setting the from address for all system emails seems to have fixed the problem.

If anyone else has this problem, you have to do the following:

  • Go to your discourse folder: cd /var/discourse
  • Add the authentication method to containers/app.yml: DISCOURSE_SMTP_AUTHENTICATION: login
  • Manually create the admin account in the terminal as you can’t receive the verification email. To do this, you need to do the following: ./launcher enter app followed by rake admin:create then follow the steps presented in the terminal
  • Finally go to the Admin settings and change the notification email to the email address you’re trying to authenticate against

It would be easier if in the app.yml file you could set your from address, however, I couldn’t find a way to do that.

3 Likes

Glad you got it sorted! I don’t think I’ve seen that.

It’s right here:

https://github.com/discourse/discourse_docker/blob/master/samples/standalone.yml#L98

1 Like

Or I just can’t read!.. Wow, thank you!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.