I moved a server behind a NAT firewall and started having problems with SMTP mail within my PHP scripts.
We'll say the public IP is: 24.101.202.14
And the firewall routes this IP to: 192.168.0.14
The errors I'm getting are like this:
Warning: fsockopen(): unable to connect to mydomain.com:25 in /home/mydomain/public_html/forums/includes/smtp.php on line 111
Warning: Cannot modify header information - headers already sent by (output started at /home/mydomain/public_html/forums/includes/smtp.php:111) in /home/mydomain/public_html/forums/includes/page_header.php on line 474
Warning: Cannot modify header information - headers already sent by (output started at /home/mydomain/public_html/forums/includes/smtp.php:111) in /home/mydomain/public_html/forums/includes/page_header.php on line 476
Warning: Cannot modify header information - headers already sent by (output started at /home/mydomain/public_html/forums/includes/smtp.php:111) in /home/mydomain/public_html/forums/includes/page_header.php on line 477
I'm thinking this has something to do with the headers. Could this be a configuration in Exim that I could change to fix the problem?
This is a CPanel / Red Hat Enterprise 4 server.
Thanks!