SSL Mail server connection times out on send()

Posted by Jivan on Server Fault See other posts from Server Fault or by Jivan
Published on 2013-06-28T14:02:45Z Indexed on 2013/06/30 10:22 UTC
Read the original article Hit count: 197

Filed under:
|

When trying to programmatically send an email from a website of mine, with PHP Pear Mail package with SSL connection, PEAR:Mail replies the following :

Failed to connect to example.blabla.net:PORT
[SMTP: Failed to connect socket: connection timed out (code: -1, response: )]

I looked for similar questions on SO and SF, all the answers asking the OP to test a request on telnet or ssh in command line. So, that is what I did and here is what happens :

$ ssh -l myusername -p PORT example.blablabla.net
_

Here, '_' in the second line means that NOTHING happens. Indefinitely, which seems coherent with the timeout message I had from PEAR:Mail. So PEAR:Mail seems out of cause.

But, what I have to tell you is that yesterday, it just worked. Connection was properly established, mails were properly sent, etc. Just today, it doesn't work anymore and I absolutely don't know why. I restarted Apache (in case an extension was broken), restarted mail services, etc. Still. No effect.

Before yesterday (when it worked) and today (when it doesn't anymore), I just didn't touch the server and did nothing on it, simply because I took a day off to write some blog post!

Have anyone of you encountered similar problem ? The problem seems quite common, judging after some googling, but the solution doesn't.

Thanks for any help !

(note on config : CentOS 6.4 x86_64 with cPanel/WHM)

© Server Fault or respective owner

Related posts about ssh

Related posts about emailserver