1

I am unable to get email functioning in WP 4.8.

I have WordPress running on a Bitnami LAMP stack. All modules/plugins/themes/languages are up to date.

I have an 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 believe) 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 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:[email protected]
RCPT TO:[email protected]
DATA
TEST
.

This 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.

1 Answer 1

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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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