1

I am unable to get email functioning in WP 4.8.

I have wordpress running on a straight forward LAMP stack. It is actually the Bitnami appliance as I'm lazy and needed something up quickly. All modules/plugins/themes/languages are up to date.

I have a SMTP host that is effectively an open relay (coming from my network only) and so does not require or support authentication. I want to use this to deliver all SMTP from Wordpress.

Wordpress has the plugin WP-Mail-SMTP which allows basic email config and test. Using this plugin I have tried a combination of all the possible settings, all of which fail.

My ideal (I beleive) setup would be

Send All WordPress email via SMTP
SMTP Host : mailgateway.com.outbound.epasecure.com
SMTP Port : 25
Encryption : No Encryption
Authentication : No: Do notuse SMTP authentication

The log output I believes demonstrates the issue I am having is like this [Note : IP.AD.DRE.SS is a sanitized version of my WAN ip]

The SMTP debugging output is shown below:
 2017-10-09 14:43:40    Connection: opening to mailgateway.com.outbound.epasecure.com:25, timeout=300, options=array (
                                          )
 2017-10-09 14:43:41    Connection: opened
 2017-10-09 14:43:41    SMTP -> get_lines(): $data is ""
 2017-10-09 14:43:41    SMTP -> get_lines(): $str is  "220 out4d.electric.net ESMTP"
 2017-10-09 14:43:41    SERVER -> CLIENT: 220 out4d.electric.net ESMTP
 2017-10-09 14:43:41    CLIENT -> SERVER: EHLO 192.168.50.94
 2017-10-09 14:43:41    SMTP -> get_lines(): $data is ""
 2017-10-09 14:43:41    SMTP -> get_lines(): $str is  "250-out4d.electric.net Hello 192.168.50.94 [IP.AD.DRE.SS]"
 2017-10-09 14:43:41    SMTP -> get_lines(): $data is "250-out4d.electric.net Hello 192.168.50.94 [IP.AD.DRE.SS]"
 2017-10-09 14:43:41    SMTP -> get_lines(): $str is  "250-SIZE 268435456"
 2017-10-09 14:43:41    SMTP -> get_lines(): $data is "250-out4d.electric.net Hello 192.168.50.94 [IP.AD.DRE.SS]"
                                          250-SIZE 268435456
 2017-10-09 14:43:41    SMTP -> get_lines(): $str is  "250-8BITMIME"
 2017-10-09 14:43:41    SMTP -> get_lines(): $data is "250-out4d.electric.net Hello 192.168.50.94 [IP.AD.DRE.SS]"
                                          250-SIZE 268435456
                                          250-8BITMIME
 2017-10-09 14:43:41    SMTP -> get_lines(): $str is  "250-PIPELINING"
 2017-10-09 14:43:41    SMTP -> get_lines(): $data is "250-out4d.electric.net Hello 192.168.50.94 [IP.AD.DRE.SS]"
                                          250-SIZE 268435456
                                          250-8BITMIME
                                          250-PIPELINING
 2017-10-09 14:43:41    SMTP -> get_lines(): $str is  "250-AUTH LOGIN"
 2017-10-09 14:43:41    SMTP -> get_lines(): $data is "250-out4d.electric.net Hello 192.168.50.94 [IP.AD.DRE.SS]"
                                          250-SIZE 268435456
                                          250-8BITMIME
                                          250-PIPELINING
                                          250-AUTH LOGIN
 2017-10-09 14:43:41    SMTP -> get_lines(): $str is  "250-STARTTLS"
 2017-10-09 14:43:41    SMTP -> get_lines(): $data is "250-out4d.electric.net Hello 192.168.50.94 [IP.AD.DRE.SS]
                                          250-SIZE 268435456
                                          250-8BITMIME
                                          250-PIPELINING
                                          250-AUTH LOGIN
                                          250-STARTTLS
 2017-10-09 14:43:41    SMTP -> get_lines(): $str is  "250 HELP"
 2017-10-09 14:43:41    SERVER -> CLIENT: 250-out4d.electric.net Hello 192.168.50.94 [IP.AD.DRE.SS]
                                          250-SIZE 268435456
                                          250-8BITMIME
                                          250-PIPELINING
                                          250-AUTH LOGIN
                                          250-STARTTLS
                                          250 HELP
 2017-10-09 14:43:41    CLIENT -> SERVER: STARTTLS
 2017-10-09 14:43:41    SMTP -> get_lines(): $data is ""
 2017-10-09 14:43:41    SMTP -> get_lines(): $str is  "220 TLS go ahead
 2017-10-09 14:43:41    SERVER -> CLIENT: 220 TLS go ahead
 2017-10-09 14:43:41    SMTP Error: Could not connect to SMTP host.
 2017-10-09 14:43:41    CLIENT -> SERVER: QUIT
 2017-10-09 14:43:41    SMTP -> get_lines(): $data is ""
 2017-10-09 14:43:41    SMTP -> get_lines(): $str is  "221 out4d.electric.net closing connection"
 2017-10-09 14:43:41    SERVER -> CLIENT: 221 out4d.electric.net closing connection
 2017-10-09 14:43:41    Connection: closed
 2017-10-09 14:43:41    SMTP Error: Could not connect to SMTP host.

The crucial element here is as follows :

2017-10-09 14:43:41    CLIENT -> SERVER: STARTTLS
2017-10-09 14:43:41    SERVER -> CLIENT: 220 TLS go ahead
2017-10-09 14:43:41    CLIENT -> SERVER: QUIT

The client is negotiating TLS despite the WP-Mail-SMTP config being set to not do so, and the relay I am sending via not requiring TLS to connect.

If I SSH to the wordpress server and TELNET to the SMTP relay I can do a manual email as follows:

>telnet mailgateway.com.outbound.epasecure.com 25
EHLO example.com
MAIL FROM:someone@example.com
RCPT TO:example@someone.com
DATA
TEST
.

which sends as expected.

As work arounds I have tried to get this working with both sSMTP and most recently Postfix installed on the Wordpress host.

I have configured Postfix as an open relay and telnet localhost 25 works and allows me to send mail via my normal relay.

When configuring wordpress to send via localhost:25 i get the same failure, the Client negotiates TLS, the server responds and the client quits.

I would like to prevent the client from offering TLS. How do I configure Wordpress to do this.

0

I never did get this to work, as a work around I had to configure the WP-SMTPMail to send directly to our Office365 instance, which required an additional user to be configured.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.