Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

PHP Mail getting blocked from our Exchange Server

Posted on 2012-03-15
6
Medium Priority
?
1,331 Views
Last Modified: 2012-04-12
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
0
Comment
Question by:Jeffery Byers
  • 3
  • 2
6 Comments
 
LVL 22

Accepted Solution

by:
Kim Walker earned 2000 total points
ID: 37724977
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
 
LVL 4

Expert Comment

by:ScannyR
ID: 37725639
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
 

Author Comment

by:Jeffery Byers
ID: 37726242
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
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
LVL 22

Expert Comment

by:Kim Walker
ID: 37726632
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
 

Author Comment

by:Jeffery Byers
ID: 37730644
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
 

Author Comment

by:Jeffery Byers
ID: 37837532
Sorry for the late reply.  Was finally able to test that change on Monday and it worked.  

Thanks guys
0

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Last month Marc Laliberte, WatchGuard’s Senior Threat Analyst, contributed reviewed the three major email authentication anti-phishing technology standards: SPF, DKIM, and DMARC. Learn more in part 2 of the series originally posted in Cyber Defense …
In my humble opinion (IMHO), TouchDown from Symantec is the best in class for this type of application, but Symantec has end-of-lifed it and although one can keep using it, it will no longer be supported or upgraded.  Time to look for alternatives t…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question