Error TLS

Urano

New Member
Hi,
I updated PHP to 5.6, and I started to receive errors with email sended by mailwizz:

2016-01-28 11:41:01 TLS error on connection from (codigonube.com) [169.57.2.21]:58163 (SSL_accept): error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca

I changed php.ini (in public_html):
verify_peer_name=FALSE
verify_peer=FALSE

but the problem persists.

Someone have idea what I need to do?

Thnaks,

Urano.
 
try to update your server certificates:
yum install ca-certificates
or
apt-get install ca-certificates
 
Hi,

PHP 5.6 default enable verify_peer_name and verify_peer, self-signed certificate does not work.

Verify_peer_name and verify_peer not working in php.ini, only work in SSL connection context.

Example:

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

PHP 5.6 default enable verify_peer_name and verify_peer, self-signed certificate does not work.

Verify_peer_name and verify_peer not working in php.ini, only work in SSL connection context.

Example:

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

check the TLS and SSL of your server from another email client
if it does not work, go to your server admin/hosting firm or google and solve
it does not seem like a mwz problem
 
@frm.mwz - indeed it is not a mailwizz issue, but we can do something to alleviate this, that is, to add the above options that @Treck mentioned as part of the application ;)
 
Thunderbird, Outlook -> work (but show self-signed certificate notify)
Mailwizz with php 5.5 -> work (everywhere without fail)
Mailwizz with php 5.6 -> does not work tls/ssl

I do not know, that mailwizz problem, or phpmailer / swiftmailer problem (what use mailwizz) :)

I wrote above, it has changed the operation of openssl in php 5.6 :)
 
@Treck - you can open apps/common/mailers/MailerPHPMailer.php and look for:
PHP:
protected function getMailer()
{
    if ($this->_mailer === null) {
        $this->_mailer = new MPHPMailer();
        $this->_mailer->WordWrap    = 900;
        $this->_mailer->CharSet     = Yii::app()->charset;
        $this->_mailer->SMTPDebug   = 1;
        $this->_mailer->Debugoutput = 'logger';
        $this->_mailer->Encoding    = 'quoted-printable'; // since 1.3.6.0
        // $this->_mailer->Encoding = '8bit'; // since 1.3.6.0

        // since 1.3.5.3
        $this->_mailer = Yii::app()->hooks->applyFilters('mailer_after_create_mailer_instance', $this->_mailer, $this->_params, $this);
    }
    return $this->_mailer;
}

And make it:
PHP:
protected function getMailer()
{
    if ($this->_mailer === null) {
        $this->_mailer = new MPHPMailer();
        $this->_mailer->WordWrap    = 900;
        $this->_mailer->CharSet     = Yii::app()->charset;
        $this->_mailer->SMTPDebug   = 1;
        $this->_mailer->Debugoutput = 'logger';
        $this->_mailer->Encoding    = 'quoted-printable'; // since 1.3.6.0
        // $this->_mailer->Encoding = '8bit'; // since 1.3.6.0
       
        // ADDED THIS
        if (property_exists($this->_mailer, 'SMTPOptions')) {
            $this->_mailer->SMTPOptions = array(
                'ssl' => array(
                    'verify_peer'       => false,
                    'verify_peer_name'  => false,
                    'allow_self_signed' => true
                )
            );
        }

        // since 1.3.5.3
        $this->_mailer = Yii::app()->hooks->applyFilters('mailer_after_create_mailer_instance', $this->_mailer, $this->_params, $this);
    }
    return $this->_mailer;
}
 
Thunderbird, Outlook -> work (but show self-signed certificate notify)
Mailwizz with php 5.5 -> work (everywhere without fail)
Mailwizz with php 5.6 -> does not work tls/ssl

I do not know, that mailwizz problem, or phpmailer / swiftmailer problem (what use mailwizz) :)

I wrote above, it has changed the operation of openssl in php 5.6 :)
could be a firewall issue, server protocol setup issue, try your server admin/hosting
 
@Treck - you can open apps/common/mailers/MailerPHPMailer.php and look for:
PHP:
protected function getMailer()
{
    if ($this->_mailer === null) {
        $this->_mailer = new MPHPMailer();
        $this->_mailer->WordWrap    = 900;
        $this->_mailer->CharSet     = Yii::app()->charset;
        $this->_mailer->SMTPDebug   = 1;
        $this->_mailer->Debugoutput = 'logger';
        $this->_mailer->Encoding    = 'quoted-printable'; // since 1.3.6.0
        // $this->_mailer->Encoding = '8bit'; // since 1.3.6.0

        // since 1.3.5.3
        $this->_mailer = Yii::app()->hooks->applyFilters('mailer_after_create_mailer_instance', $this->_mailer, $this->_params, $this);
    }
    return $this->_mailer;
}

And make it:
PHP:
protected function getMailer()
{
    if ($this->_mailer === null) {
        $this->_mailer = new MPHPMailer();
        $this->_mailer->WordWrap    = 900;
        $this->_mailer->CharSet     = Yii::app()->charset;
        $this->_mailer->SMTPDebug   = 1;
        $this->_mailer->Debugoutput = 'logger';
        $this->_mailer->Encoding    = 'quoted-printable'; // since 1.3.6.0
        // $this->_mailer->Encoding = '8bit'; // since 1.3.6.0
      
        // ADDED THIS
        if (property_exists($this->_mailer, 'SMTPOptions')) {
            $this->_mailer->SMTPOptions = array(
                'ssl' => array(
                    'verify_peer'       => false,
                    'verify_peer_name'  => false,
                    'allow_self_signed' => true
                )
            );
        }

        // since 1.3.5.3
        $this->_mailer = Yii::app()->hooks->applyFilters('mailer_after_create_mailer_instance', $this->_mailer, $this->_params, $this);
    }
    return $this->_mailer;
}

Oh, thanks! Work perfektly :)

I not found, that which file includes the "email send" functions :) So I did not know where to enter the smtpoptions parametres :)

Thanks again!
 
Back
Top