How do I resolve the 553 sender is spoofed error when sending email from PHP to exchange?
Posted on 2009-05-03
Hello! We currently have a linux web server running cpanel with php at a remote location. We recently installed an ms exchange 2007 server in our internal network which is protected by websense proxy. On cpanel, I changed the A record for the MX entry to point to the exchange server's IP address and added the domain to the remotedomains file and removed from localdomains on the webserver and unchecked the box for always accept mail locally. Lastly, we created a PTR (reverse DNS) record for exchange and the webserver IP addresses.
We have approximately 6 domains that will use exchange for mail.
Everything works fine except when I use PHP's mail() function from a web page to send email to and email address on exchange. Each time I get a mail delivery failed message indicating 553: sender is spoofed. I have googled for hours and came up with nothing. Can anyone advise? It is critical that the webpages be able to send email to an address on exchange as the webpages have contact forms on them.
I have tried the phpmailer script from sourceforge, tried Matt's formmail script, and even added the webserver IP to the exchange whitelist. All to no avail.