Setting up SMTP

(Zach) #1

Hello people of discourse :smiley:

I’ve been trying for a while to get my SMTP routing working, and now I’m getting an interesting issue when I check mailgun send logs. It finally goes through, but it tries to send to what appears to be a redundant email. This is the send log.

  "severity": "permanent",
  "tags": [],
  "delivery-status": {
    "retry-seconds": 14400,
    "message": "Unable to connect to MX servers: []",
    "code": 499,
    "description": "Unable to connect to MX servers: []",
    "session-seconds": 0
  "envelope": {
    "targets": "",
    "transport": "smtp",
    "sender": ""
  "recipient-domain": "",
  "id": "it was a random string..but i figure security",
  "campaigns": [],
  "reason": "old",
  "user-variables": {},
  "flags": {
    "is-routed": null,
    "is-authenticated": true,
    "is-system-test": false,
    "is-test-mode": false
  "log-level": "error",
  "timestamp": 1443525153.274898,
  "message": {
    "headers": {
      "to": ",",
      "message-id": "",
      "from": "Excited User <>",
      "subject": "Hello"
    "attachments": [],
    "recipients": [
    "size": 549
  "recipient": "",
  "event": "failed"

*I’ve replaced my email with
as you can see, its sending to

This is whats in my app.yml


## TODO: The domain name this Discourse instance will respond to

## TODO: The mailserver this Discourse instance will use
DISCOURSE_SMTP_ADDRESS:         # (mandatory)
DISCOURSE_SMTP_PORT: 465                          # (optional)
DISCOURSE_SMTP_USER_NAME:      # (optional)
DISCOURSE_SMTP_PASSWORD: myPassword             # (optional, WARNING the c$
#DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)

Sorry everyone for the pretty newb question :yum:

(Matt Palmer) #2

Did you rebuild the container after changing your e-mail address in app.yml? A quick ./launcher rebuild app should do the trick.

(Zach) #3

yep. I have a different error now though, that comes from sidekiq logs.

Any Idea what this might mean?

(Matt Palmer) #4

The SSLError means that mailgun needs to lrn2ssl – the connection to is presenting a certificate for *, which isn’t the same thing at all. The ReadTimeout errors seem more like network problems; likely a flaky connection.

(Zach) #5

it looks like mailgun has dropped ssl from their pop3 protocol due to POODLE vulnerability. (Don’t know what that is exactly…) Is there a way to disable SSL to avoid moving to another mail server, or is this something that’s required? Again, sorry for the complete newbness :yum:

(Matt Palmer) #6

If you want to disable TLS, you need to uncomment this line, and set it to false:

#DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)

However, there’s no relationship between POODLE and newer TLS protocol versions, nor is there any relationship between SMTP and POP3. Mailgun does support TLS on SMTP connections, they just don’t support it correctly.

(Zach) #7

Thank you so much for the help! I ended up migrating to mandrill for the sake of simplicity though. Emails went through after updating the SMTP address server side. Parts working together is a beautiful thing! :yum: