TLS authentication does not work after 3.0.8

Once you've installed phpList... ask questions here!
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation.

TLS authentication does not work after 3.0.8

Postby rexemtrebor » 9:27am, Thu 23 Apr, 2015

Hi,

I have a problem after upgrading from 3.0.6 to 3.0.12 a few weeks ago: Yesterday I noticed that I cannot send mails any more.

After each attempt to send a test-mail I get the info that sending was unsuccessful and the log entry states „SMTP connect() failed“

First I thought it would be a problem with my mail configuration but when I went back to Version 3.0.6 it was still working with the same configuration. So I tried different versions of phplist (I always used the config.php of my working 3.0.6 configuration):

Everything is working fine until version 3.0.8, the problems start with 3.0.9 up to 3.0.12. All other conditions stay the same (php 5.3, mysql 5.5.42, no server configuration changed on my VM SLES 11 SP3). Does anybody have an idea about that?

I would not care to stay a 3.0.8 if necessary, but unfortunatelly I upgraded the database structure to the 3.0.12 version - is it possible to revert this manually?

Thanks for your help,

Treb
Last edited by rexemtrebor on 9:00am, Tue 28 Apr, 2015, edited 1 time in total.
rexemtrebor
phpList newbie
 
Posts: 4
Joined: 9:08am, Thu 23 Apr, 2015

Re: Mail cannot be sent after upgrading to 3.0.12

Postby duncanc » 7:31am, Fri 24 Apr, 2015

I cannot see anything that mght be the cause of this problem in the change log for release 3.0.9 https://mantis.phplist.com/changelog_page.php?version_id=100.

But it might be caused by either the From address of the message or the bounce address ($message_envelope in config.php) that you are using. Are they on the same domain as phplist is installed?
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: Mail cannot be sent after upgrading to 3.0.12

Postby rexemtrebor » 12:25pm, Mon 27 Apr, 2015

Thanks for your answer!

We use an external mail server for sending our emails so the domain names are in fact different. But I tried it with a mail server that has at least the same root domain, but noting changes, still a smtp connect error.

I am at a loss about that problem. Any other ideas? Can I get more debug info from the system? There are no messages in my system log.
rexemtrebor
phpList newbie
 
Posts: 4
Joined: 9:08am, Thu 23 Apr, 2015

Re: Mail cannot be sent after upgrading to 3.0.12

Postby duncanc » 12:49pm, Mon 27 Apr, 2015

See this post for how to enable debug for phpmailer, https://forums.phplist.com/viewtopic.php?f=24&t=39383&hilit=+debug#p96603. The line that is referenced is now 747 in phplist release 3.0.12.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: Mail cannot be sent after upgrading to 3.0.12

Postby rexemtrebor » 3:04pm, Mon 27 Apr, 2015

OK, I compared the source code and found a major difference between 3.0.8 and 3.0.9: A new PHPMailer was integrated, which jumped from 5.2.4 to 5.2.9. The code changes are massive between those two versions. This seems to be the reason for the different behaviour.

The debug mode is most helpful:

I already get an error in 3.0.8:
Code: Select all
SMTP -> ERROR: AUTH not accepted from server: 503 5.5.1 Error: authentication not enabled

But the mail is being sent anyway

In 3.0.9 I get with the same configuration:
Code: Select all
SMTP ERROR: AUTH command failed: 503 5.5.1 Error: authentication not enabled
CLIENT -> SERVER: QUIT
SERVER -> CLIENT: 221 2.0.0 Bye
SMTP connect() failed.


Ok, so It seems as if I have a authentification problem that was ignored before.

Until now everything worked fine in 3.0.8 with
Code: Select all
define('PHPMAILERPORT',25);

and no PHPMAILER_SECURE defined

My emailprovider supports TLS on Port 587. So I changed the config.php to
Code: Select all
define('PHPMAILERPORT',587);
define("PHPMAILER_SECURE",'tls');


But Debug says:
Code: Select all
CLIENT -> SERVER: STARTTLS
SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
CLIENT -> SERVER: QUIT
SERVER -> CLIENT: SMTP ERROR: QUIT command failed:
SMTP connect() failed

Why does the client (phplist) tell the server to quit? Did I miss something important in the configs?
rexemtrebor
phpList newbie
 
Posts: 4
Joined: 9:08am, Thu 23 Apr, 2015

Re: Mail cannot be sent after upgrading to 3.0.12

Postby duncanc » 4:30pm, Mon 27 Apr, 2015

This isn't an area that I know anything about. But if you change the debug level to 4 then there should be more detailed debug output.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: Mail cannot be sent after upgrading to 3.0.12

Postby rexemtrebor » 8:59am, Tue 28 Apr, 2015

Thanks for your help! I found the solution based on the debug information:

I had to install the openssl-extension for php, now it works perfectly :D

To put the thread into a nutshell for future readers:

If your TLS authentication does not work check if your openssl extension has been loaded:

Code: Select all
grep -Hrv ";" /etc/php5 | grep -i "extension="


Maybe it should be considered to allow the activation of the debug settings with the phplist UI?
rexemtrebor
phpList newbie
 
Posts: 4
Joined: 9:08am, Thu 23 Apr, 2015


Return to Questions and Problems after Installing

Who is online

Users browsing this forum: No registered users and 5 guests