MyBB Community Forums

Full Version: Failed to start TLS encryption - SMTP - $50 REWARD TO FIX
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Been working fine for over 3months, I believe I updated my server when this has occurred...the only thing I can think of that has disrupted it. Now it's not sending out the emails, and is displaying the current error:

[Image: e3a67656e6ebf621ab348a1e0f4ef76a.png]

What do you think this could be related too? Really pulling my hair out on this. I'm using Ubuntu 16.0.4.

EDIT: I'm willing to give the person who fixes this $20.
Your mail server may not have a valid or a self-signed SSL certificate. If it's only the same server I'd recommend not to use encryption at all.
(2017-03-25, 08:55 PM)StefanT Wrote: [ -> ]Your mail server may not have a valid or a self-signed SSL certificate. If it's only the same server I'd recommend not to use encryption at all.

Amazon SES has no option to disable TLS since it's set as default. 
When I disable TLS via MyBB I receive: The SMTP server did not respond correctly to the AUTH LOGIN command
 
Also, I don't want to use GMAIL since that leaks the servers IP in mail headers.

Will to reward the user $50. That's all I can offer at the moment. Anyone?

Bumping this, anyone?
I'm willing to pay $50 to anyone who can help me fix this, thanks.
obvious query : have you tried the search results ..
I would suggest to move to any other mail provider if you are not able to find the fix, if i was you i'll go with mailchimp or any other alternative which supports SMTP. Have you tried to change security protocol label to STARTSSL?.
I've been beating my head against this one for hours now and finally got it.  I figured I would share what I did here.

I dropped the following into a separate file in my mybb root directory, it made sending out mails a lot easier and also displayed more error information than I was able to find through the mybb interface.  Browse to it to activate.  You'll have to change '[email protected]' to a valid email address.
<?php

define('IN_MYBB', 1);
define('THIS_SCRIPT', 'mytest.php');

require_once('./global.php');

function myErrorHandler($errno, $errstr, $errfile, $errline)
{
        print "Error: " . $errstr;
}

set_error_handler( 'myErrorHandler' );

my_mail( '[email protected]', 'Testing...', 'This is a test' );

?>

I then configured Apache to run only one worker.  The settings for this were in /etc/apache2/mods-enabled/mpm_prefork.conf, though yours might be elsewhere depending on your setup.  I then restarted Apache.

Once Apache was running with one worker I got the pid of the worker with ps aux and then ran "strace -p 3434 >strace.out 2>&1" (where 3434 was the particular pid of my worker).  You might have to install strace for this to work.

I attempted to send out an email via the script above and examined the contents of strace.out, finding the following (grepping for ENOENT might help here). 


stat("/usr/lib/ssl/certs/2e5ac55d.0", 0x7fffbb55ed10) = -1 ENOENT (No such file or directory)
stat("/usr/lib/ssl/certs/2e5ac55d.0", 0x7fffbb55ed10) = -1 ENOENT (No such file or directory)

Once I ensured that those files were available to php mybb was able to send mail again.

One thing that I've been reading is that PHP 5.6 sometimes requires the default cert file to exist and be valid in order to make outgoing TLS connections.  You can find the default cert file location by running php -r 'print_r(openssl_get_cert_locations());' at the command-line. This turned out not to be the problem in my case, but if it was then it should have produced an error line in strace.out

Good luck.