SMTP Mail Problems on MediaTemple DV Server

(Kirupa Chinnathambi) #1

Hi, everybody!
I’m trying to get my discourse instance to recognize my SMTP settings so that mails can be sent. My mail server is on mediatemple (DV), and I was wondering if somebody can help me figure out what I may be doing incorrectly.

In my Plesk control panel, I have set the following values:

In my domain’s e-mail account, I created a new mail username + password, and I also created a mailbox for it.

In my app.yml, here are the relevant settings I’ve specified:

  ## TODO: The mailserver this Discourse instance will use
  DISCOURSE_SMTP_ADDRESS:         # (mandatory)
  DISCOURSE_SMTP_PORT: 587                        # (optional)

With these settings, I am unable to send any e-mails. When I use my temporary mandrill e-mail account settings, everything works fine. Because using the mandrill settings works, I feel this issue is with my mail server.

I’ve tried the official email troubleshooting steps. I am able to telnet in using telnet 587. Yay! Unfortunately, when I attempt to run the mailtest app, I do get the following error:

 DISCOURSE_SMTP_ settings:

ERROR: unable to establish TLS: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)
 Fix the host certificate or disable validation

I am assuming this is related to why Discourse can’t send any e-mails using my current account.

Does anybody know what I need to do differently?


(Jens Maier) #3

Add DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none to your email configuration or install a trusted SSL certificate for your SMTP server. Note that the mailtest script ignores this setting and will fail, but Discourse itself should accept your mailserver despite the invalid (self-signed?) certificate.

(Should have been a reply to @kirupa, but I done goofed.)