Link to home
Start Free TrialLog in
Avatar of bigeven2002
bigeven2002Flag for United States of America

asked on

How do I resolve the 553 sender is spoofed error when sending email from PHP to exchange?

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.
ASKER CERTIFIED SOLUTION
Avatar of Suraj
Suraj
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bigeven2002

ASKER

Ok I'm on Exchange Management Console: I see Server Configuration but I don't see E-mail Connection Management under it.  Could you clarify?
Sorry I didn't realize you were talking about Websense in the steps you mentioned.  I did verify that the box for deny messages with spoofed addresses was unchecked, but it had no effect.

I did manage to get it to work to an extent though, what I had to do was create a new SMTP receive connector in Exchange management console that pointed to the webserver's public IP address.  Then the mail finally went through.