Jump to content

1.7.6.0. SMTP problems


mflorezm

Recommended Posts

Hi Everyone,

i'm having problems to setup SMTP on PS 1.7.6.0.

The mail server is a totally diferent server machine from server where PS 1.7.6.0. is hosted.

I have no problems to send email with the smtp on my cell phone and on several tunderbrid email clients, but 1.7.6.0 always show me an error, no matter if we try secure SMTP (SSL) on por 587 and even just simple SMTP on port 25.

Even worse, we still have the old PS 1.7.2.4 server online, on a third machine and it works perfect with 100% same SMTP details. The only diference is that the new 1.7.6.0. is working on Apache over Debian buster and the old 1.7.2.4 is on IIS over Win2016.

The debian machine UFW firewall is disable, and even worse i can do a telnet EHLO session with port 587 from the debian machine, so, the problem is not the firewall, the port, the conection, or even the DNS. The problem is something inside PS 1.7.6.0., but i dont know where to look.

Is there any place to find a log about SMTP auth?

Any ideas? any Help? Thanks.

Regards,

Mauricio F.

 

 

1.7.2.4.JPG

1.7.6.0.JPG

Link to comment
Share on other sites

Hi Guys, 

Is really sad that nobody tried to answer nothing about this issue becuase that make no sense to have a forum, so I found the solutions by myself.

The problem was that Swiftmailer (What Prestashop uses for SMTP), was not able to handle my let's encrypt SSL certificated. As it seams, Swiftmailer don't accept self signed SSL certs.

I found the solution on this web site: https://github.com/humhub/humhub/issues/3140

Adding next line to \vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\streamBuffer.php

$options = array_merge($options, array('ssl' => array('allow_self_signed' => true, 'verify_peer' => false))); //MFM 23/08/2019 SSL email problem

Just above 

        if (isset($this->_params['stream_context_options'])) {
            $options = array_merge($options, $this->_params['stream_context_options']);
        }

Attached is the modified file.

Thanks,

Mauricio F.

StreamBuffer.php

  • Like 9
Link to comment
Share on other sites

  • 3 months later...

Thank you for sharing.

After updating our server certificate to SECTIGO, we've got into the exact same error. Apparently the swiftmailer certs list is far from being up to date. Glad to have found this topic which allowed us to finally move on after struggling with this for days. 

 

Link to comment
Share on other sites

  • 4 months later...

That was several months ago, and i really don't have the problem fresh in my mind to help you right now.

What SSL cert brand are you using? doing a fast google research the problem is really not Swiftmailer or let's encrypt SSL cert. The real problem behing is the protocol that your mail server use. Please try to disable TLS1.0, TLS1.1 and SSL3 that are vulnerable on your mail server. As i found in google there is no issues with TL2.0 or TLS3.

I did a fresh 1.7.6.4 install last week and this time it is working without doing any changes, so, i'm pretty sure that it is not PS1.7.6.4 problem, that is why i really beleive it is a TLS bad config on your mail server, becuase right now we only use TLS2.0 and TLS3.0 in our mail server, and did not had to modify the above file.

BTW, today is my Birthday.

Thanks and best regards,

MFM

 

 

 

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

I know this is an old article but anyone managed to come with proper solution to this ? I actually can't get it working with my let's encrypt SSL on port 587 or 465 but manage to get smtp working through port 25 just fine .

 

Help will be appreciated.

Link to comment
Share on other sites

  • 3 months later...

 I had a similar problem on Prestashop 1.7.6.4. , with the error "Connection timed out" with particular SMTP settings. Clients such as thunderbird and claws work without problems. Tcpdump shows timeout trying to manage the TLS handshake. 

Finally decided to use PHP-mail function instead of Swiftmailer:

  1. Install Postfix and configure it in relay mode  https://www.linode.com/docs/guides/postfix-smtp-debian7 
  2. Edit the php-config "sendmail_path = /usr/sbin/sendmail -t -i"

Some advantages are : 

  • Postfix is easier to test, using the command line and enabling options of debugging.
  • Postfix has a lot of configurable options to accomplish with your SMTP server requirements postfix config 

I just want to share another approach to solve it  (less patiently), if you have a self-manage the server.  

Edited by nelsondspy (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 3 months later...

Hello,

In my case, my SMTP server is not using a FQDN so the name on the certificate did not correspond. So I had to add the option 'verify_peer_name' => false to make it work

$options = array_merge($options, array('ssl' => array('allow_self_signed' => true, 'verify_peer' => false, 'verify_peer_name' => false))); //MFM 23/08/2019 SSL email problem

Link to comment
Share on other sites

  • 2 months later...

Hmm, none of these lines work for me.
I have bought a module and only that module has issues sending out mail.

But it's clearly having the same kind of issue as is being discussed here, see attached screenshot. I'm guessing it's to do with our SMTP settings. We are using our own mailserver.

 

 

60afe0d7a7341.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...