PHP Mail getting blocked from our Exchange Server

Hopefully this will be a easy one someone can help me with.

System:
MS Windows Server 2003 R2
Enterprise x64 Edition SP2
Exchange 2007 Standard Edition.


Awhile back, the company I work for, hired a third party vendor to complely redesign our website.  They set up a contact page, and on this contact page is a form to fill out to ask whatever questions the customer may want to submit.  When the customer hits submit, it sends all the information to Sales@domain.com.  I set up a distribution address on our Exchange server called Sales@domain.com and added a few users who would be answering those emails.

For testing purposes I added my name to the distribution list (sales@domain.com). The problem is, when I send a message using the contact form on the website, the information never makes it to sales@domain.com.  I've searched through the message tracking logs on exchange and I do not see anywhere in there that it made it to the exchange server. I also checked our GFI Mail Security Suite and there is no trace of it ever getting caught up there either.  I know that sales@domain.com works because I can send a email from a personal gmail account and everyone on the distribution list receives it.  I also know that the contact form works as well.  I had the website developer add my personal gmail account, and yahoo account and I received it at both accounts.  So the problem lies on my side of the network.  

I emailed the website guys to ask them how the webserver was sending the mail and this is the response I received back.

We're using PHP Mail() function http://php.net/manual/en/function.mail.php

$response = mail(implode(',',$to_address), $email_subject, $email_message, $headers);


Since it seems to work at any account outside of our exchange accounts, here is what I get to my gmail account when I go to "show original" inside the message.

Delivered-To: user@gmail.com
Received: by 10.220.39.138 with SMTP id g10csp161106vce;
        Thu, 15 Mar 2012 05:11:32 -0700 (PDT)
Received: by 10.50.153.165 with SMTP id vh5mr16567807igb.4.1331813492137;
        Thu, 15 Mar 2012 05:11:32 -0700 (PDT)
Return-Path: <root@u12345678.webserver.com>
Received: from u12345678.webserver.com (u12345678.webserver.com. [12.123.123.101])
        by mx.google.com with ESMTPS id d20si1730483igv.73.2012.03.15.05.11.31
        (version=TLSv1/SSLv3 cipher=OTHER);
        Thu, 15 Mar 2012 05:11:32 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of root@u12345678.webserver.com designates 12.123.123.101 as permitted sender) client-ip=12.123.123.101;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of root@u12345678.webserver.com designates 12.123.123.101 as permitted sender) smtp.mail=root@u12345678.webserver.com
Received: (qmail 30110 invoked by uid 48); 15 Mar 2012 08:21:41 -0400
Date: 15 Mar 2012 08:21:41 -0400
Message-ID: <20120315122141.30108.qmail@u12345678.webserver.com>
To: sales@domain.com, user@gmail.com
Subject: Domain.com Contact Us Submission
From: Company Website <company_website@domain.com>
Content-Type: text/html;charset="iso-8859-1"

name: blah<br>
email: user@gmail.com<br>
telephone: 5555555555<br>
comment: testing the form<br>

Anyone have any ideas on things I can look at to see why this is never hitting our exchange server?

Thanks!!

-Zachary
Jeffery ByersNetwork AdministratorAsked:
Who is Participating?
 
Kim WalkerConnect With a Mentor Web Programmer/TechnicianCommented:
Is the sender's address (root@u12345678.webserver.com) a valid email address? Gmail is a little less stringent about accepting emails. Has the website guy checked his smtp logs to confirm that the message is being sent to your exchange server? His server could be selective about sending to certain IP addresses or domain names. (I'm assuming that the domain name in your exchange server email address isn't really "domain.com" but you haven't specifically stated that.)
0
 
ScannyRCommented:
Is the domain name of the website the same as your email accounts? I've seen problems before with incorrect DNS settings causing emails sent from websites not to reach external mail accounts and this would explain why it works for external email accounts.

Rich
0
 
Jeffery ByersNetwork AdministratorAuthor Commented:
Is the sender's address (root@u12345678.webserver.com) a valid email address? Gmail is a little less stringent about accepting emails. Has the website guy checked his smtp logs to confirm that the message is being sent to your exchange server? His server could be selective about sending to certain IP addresses or domain names. (I'm assuming that the domain name in your exchange server email address isn't really "domain.com" but you haven't specifically stated that.)

The webserver, from what I know about it, is a dedicated linux server through 1and1 hosting.  The host name of the server is u12345678.webserver.com but root@u12345678.webserver.com is not a valid email as far as I know.  The only thing I know for certain is that he added 3 different email addresses that this contact form would send to.  It successfully sends to all email address he has tested it with, except for any email address on our exchange server.  And you are correct.  The "Sales@domain.com" was just an example, not the actual domain of our exchange server.  

Is the domain name of the website the same as your email accounts? I've seen problems before with incorrect DNS settings causing emails sent from websites not to reach external mail accounts and this would explain why it works for external email accounts.

Rich

Not really. By that I mean, the dedicated linux server host 5 different websites for 5 different products that my company offers.  All 5 websites have the exact same layout just different colors and graphics, so the contact form on each website all points to the same email address (sales@domain.com). I just read this earlier while searching google and wonder if this could be the reason why.  I'll quote it

I change the email headers within PHP to say they're from me@mysite.com however in /var/log/maillog I see they're sent from root@mysite.com. I feel like this is responsible for our email getting blocked on other mail systems.

After reading that I was thinking, Is it possible that because the Return-Path is set to root@u12345678.webserver.com and that address isnt a valid address on my exchange server, thats why its getting blocked/denied on getting delivered to sales@domain.com or any other email on our exchange??
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
Kim WalkerWeb Programmer/TechnicianCommented:
Yes. That's what I was eluding to when I asked if it was a valid email address. Have them try using a valid email address for the sender's address.
0
 
Jeffery ByersNetwork AdministratorAuthor Commented:
xmediaman-

Will shoot them an email and see if they can change that so it shows as a valid email address that is on our exchange server.
0
 
Jeffery ByersNetwork AdministratorAuthor Commented:
Sorry for the late reply.  Was finally able to test that change on Monday and it worked.  

Thanks guys
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.