1

A web server that has successfully sent mail using the hosting providers's SMTP server before seems to suddenly have lost connection to the SMTP server.

[Wed Nov 28 09:51:27 2012] [error] [client 10.250.11.81] PHP Warning:  fsockopen(): unable to connect to smtp.ourprovider.net:25 (Connection timed out) in /var/www/(....)/phpmailer/class.smtp.php on line 105, referer: http://oursite.net/sendmessage.php#

If I telnet to the SMTP server's port 25 manually from the web server, I'm able to connect and send mail with no problems whatsoever.

The web server is running RHEL 6.3 and Apache 2.2.15. The SE boolean httpd_can_network_connect is on. Our PHP version is 5.3.3.

Where should I start looking to fix this?

3
  • Start with dig smtp.ourprovider.net. If this returns more than one IP address, you will have to check connectivity to each of them. It's possible that PHP is trying one and your telnet is trying a different one. Also, is this timeout happening a lot or just once?
    – Ladadadada
    Nov 28, 2012 at 10:19
  • @Ladadadada: Why yes, it does return two IP addresses and the other one isn't responding. Thank you! Could you repost your comment as an answer so I can accept it? Nov 28, 2012 at 10:38
  • Heh, didn't actually expect to get it right on my first guess. Done.
    – Ladadadada
    Nov 28, 2012 at 10:45

1 Answer 1

1

Start with dig smtp.ourprovider.net. If this returns more than one IP address, you will have to check connectivity to each of them. It's possible that PHP is trying one and your telnet is trying a different one.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .