View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - phpMailer problems. - ProjeQtOr
 
 

phpMailer problems.

More
02 Aug 2015 14:12 - 02 Aug 2015 14:40 #1 by VERNCon
phpMailer problems. was created by VERNCon
Hi,

I am slowly getting deeper into trouble with the SMTP Mailer function (The IMAP receive mail works fine - at least is connecting to a valid mailbox and checking it).

The Authentication is not working - I have tried all three methods suggested in the on-line manual - so please, no RTFM response :-)

php mail is not suitable, as my mailserver will ONLY accept mail on "Submission", i.e. port 587.
Socket setting causes other problems earlier in the mail connection process, i.e, not setting up the socket.
This leaves me with phpMailer.

The logs show the following for the connection: (EDIT: This log is for "SOCKETS", not phpMailer.......)

2015-08-02 13:49:18.165 ***** ERROR ***** ERROR *****
2015-08-02 13:49:18.165 ***** ERROR ***** on file '/var/www/html/projeqtor/tool/projeqtor.php' at line (1107)
2015-08-02 13:49:18.169 ***** ERROR ***** cause = fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
2015-08-02 13:49:18.170 ***** ERROR ***** ERROR *****
2015-08-02 13:49:18.170 ***** ERROR ***** on file '/var/www/html/projeqtor/tool/projeqtor.php' at line (1107)
2015-08-02 13:49:18.170 ***** ERROR ***** cause = fsockopen(): Failed to enable crypto
2015-08-02 13:49:18.173 ***** ERROR ***** ERROR *****
2015-08-02 13:49:18.173 ***** ERROR ***** on file '/var/www/html/projeqtor/tool/projeqtor.php' at line (1107)
2015-08-02 13:49:18.173 ***** ERROR ***** cause = fsockopen(): unable to connect to ssl://mail.verncon.net:587 (Unknown error)
2015-08-02 13:49:18.173 ***** ERROR ***** Error sending mail
2015-08-02 13:49:18.173 ***** ERROR ***** SMTP Server : ssl://mail.verncon.net
2015-08-02 13:49:18.173 ***** ERROR ***** SMTP Port : 587
2015-08-02 13:49:18.173 ***** ERROR ***** SMTP User : This email address is being protected from spambots. You need JavaScript enabled to view it.
2015-08-02 13:49:18.173 ***** ERROR ***** Mail stored in Database : #29

The SSL settings on the server (Apache 2.4) do not allow SSL2 or SSL3 to be used, only TLS - what can be done to ensure that the encryption is only using TLS, not SSL2 or SSL3 as it appears to be doing?

As seen in the attachment, the server name is NOT ssl://mail.verncon.net:587, but mail.verncon.net:587.
The mailserver cannot be changed to add ssl:// as that will break several other functions.

Can the code be changed to remove the automatic addition of "ssl://" to the mailserver string?

Cheers,
VERNCon.

Attachments:
Last edit: 02 Aug 2015 14:40 by VERNCon.

Please Log in or Create an account to join the conversation.

More
02 Aug 2015 14:47 #2 by VERNCon
Replied by VERNCon on topic phpMailer problems.
Hi,

OK, making some progress - it appears to be that php5.6 has introduced Client Authentication, so will need to change the settings in the http ssl.conf to set up these checks. Shall report back later with what has been needed, or at least when I progress to the next step.....

Cheers,
VERNCon.

Please Log in or Create an account to join the conversation.

More
02 Aug 2015 15:38 #3 by babynus
Replied by babynus on topic phpMailer problems.
Ssl is not mandatory, just default if authentication is set and no protocolecspecified.
To specify other protocole, just enter it before host name :
tls://hostname
Sorry, but this is explained in the user manual.
RTFM :evil:

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
02 Aug 2015 15:39 #4 by babynus
Replied by babynus on topic phpMailer problems.
;)

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
02 Aug 2015 16:04 #5 by VERNCon
Replied by VERNCon on topic phpMailer problems.
Yes,

Tried that - my mail-server & dovecot (which does the SASL authentication for my mail-server) "spit's the dummy" with anything put in front.

Cheers,
VERNCon.

Please Log in or Create an account to join the conversation.

More
02 Aug 2015 16:43 #6 by VERNCon
Replied by VERNCon on topic phpMailer problems.
Sorry, no cigar for you this time.

The error that I am getting is as shown below:

2015-08-02 16:10:15.114 ***** ERROR ***** ERROR *****
2015-08-02 16:10:15.119 ***** ERROR ***** on file '/var/www/html/projeqtor/external/PHPMailer/class.smtp.php' at line (274)
2015-08-02 16:10:15.119 ***** ERROR ***** cause = stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
2015-08-02 16:10:15.124 ***** ERROR ***** Error sending mail
2015-08-02 16:10:15.124 ***** ERROR ***** SMTP Server : mail.verncon.net
2015-08-02 16:10:15.124 ***** ERROR ***** SMTP Port : 587
2015-08-02 16:10:15.124 ***** ERROR ***** Mail stored in Database : #32
2015-08-02 16:10:15.124 ***** ERROR ***** PHPMail error : SMTP connect() failed.
2015-08-02 16:10:15.124 ***** ERROR ***** PHPMail debug :

This is a problem which prevents the use of the use of SSL/TLS authenticated mail with php5.6 and above.

PHP5.6 now REQUIRES the supply of a client certificate, with a verifiable CA, from trhe client (i.e. from projeqtor), to allow the authentication process to be passed.

From the GitHub troubleshooting guide github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
.......................

"PHP 5.6 certificate verification failure

In a change from earlier versions, PHP 5.6 verifies certificates on SSL connections. If the SSL config of the server you are connecting to is not correct, you will get an error like this:

Warning: stream_socket_enable_crypto(): SSL operation failed with code 1.
OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

The correct fix for this is to replace the invalid, misconfigured or self-signed certificate with a good one. Failing that, you can allow insecure connections via the SMTPOptions property introduced in PHPMailer 5.2.10 (it's possible to do this by subclassing the SMTP class in earlier versions), though this is not recommended:

$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);"
...............

There is a workaround to it, but is not possible as it is only supported in a feature PHPOptions, which was introduced in phpMailer version 5.2.10, HOWEVER, the version of phpMailer which is supplied with projeqtor5.0.3 is an older version, 5.2.7

How soon can a fix/workaround to this problem be provided?

  • It would be preferable to have a patch to the code which allows for a client certificate and private key to be referenced,
or
  • otherwise an upgraded version of phpMailer, v5.2.10 or above which allows for the setting of an insecure connection to the smtp server.

Cheers,
VERNCon.

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.052 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.