php mail not arrives at gmail, not at local server

The php mail function I am using does not work completely. It will sent mails to gmail easy enough. However, emails routed directly to my internally hosted exchange server are not getting through.

The servers/domains are setup is as follows.

URLs are registered with Network solutions  (www.independentsservice.comwww.isco.net)
 
NS directs all traffic to our ISP (Socket.net).  Socket directs as follows:
 
Mail to our local server
FTP to our local server
HTTP to our website hosted on Chihost.com
 
Traffic to our local server goes through a Watchguard firewall which routes mail traffic to our locally hosted Exchange server.

Is there some reason why exchange won't accept these emails?

Thanks!
hibbsusanAsked:
Who is Participating?
 
Ray PaseurCommented:
In my experience with some hosting companies (and I believe that ChiHost is among them) I had to contact the host directly and ask them to make sure that there was zero "internal routing" of email messages.  Their servers recognized the URL in the "to" address as being a URL hosted on their servers, and they did not sent email out to the internet, choosing instead to let their servers route the mail internally.  In the case where I had a domain hosted with ChiHost and an email server hosted elsewhere, this caused internally generated messages (PHP mail() command) to get stuck in limbo at the ChiHost server.  I do not know how they fixed this, but once they became aware of the issue, they were able to fix it quickly.

Not sure if this is related to your observed issue, but maybe it is helpful information.  All the best, ~Ray
0
 
Simon Butler (Sembee)ConsultantCommented:
If you are sending email directly, rathe rthan through a smart host, then the mail sending tool is probably doing a lookup on the MX records, getting the external IP address, which it then fails to connect to because firewalls will block connections to their external interface from the internal.

If you are using name servers internally that are under your control, then create MX records for your internal domain. That could be as simple as creating a single host name that matches your public MX record host, which resolves to the Exchange server.

Single host name replacement as per my article here:
http://exchange.sembee.info/network/split-dns.asp

Simon.
0
 
hibbsusanAuthor Commented:
I think i've left out an important bit here. I apologize.

My website sits on a separate server. This server is pointed at by both isco.net and independentsservice.com. And it is from this separate server that the emails are generated. So the mails are in fact coming from an external "place"

Thanks!
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Simon Butler (Sembee)ConsultantCommented:
That was important information to leave out.
You should still verify if the server is getting the correct information. You will also need to look through logs on your server to see if the mail delivery is being attempted or not, and if it is being blocked. Script based email can often get blocked by antispam solutions because it looks like spam.

Simon.
0
 
hibbsusanAuthor Commented:
In Windows Server 2008 with Exchange 2010, can you help me find which log I should look in for failed/rejected mail? Thanks!
0
 
Simon Butler (Sembee)ConsultantCommented:
Connectivity logs should show at least the connection attempt. Look in EMC, under Server Config, Hub Transport. Right click on the server and choose Properties. That will tell you where the logs are stored.

Simon.
0
 
hibbsusanAuthor Commented:
Hello, Simon,

I found those logs for connectivity. And copied about a half-hours worth from when I know gmail was getting my php mail, but my exchange was not.

The logs are pretty incomprehensible to me. Can you tell me what I should be looking for?

Thanks!
0
 
Simon Butler (Sembee)ConsultantCommented:
If you know the IP address of the server sending the email, the search for that using standard text sarch in Notepad or whatever you are using to view the logs.

Simon.
0
 
hibbsusanAuthor Commented:
that ip does not show up in the log file..
0
 
Simon Butler (Sembee)ConsultantCommented:
In that case there isn't even a delivery attempt - the posting above about internal routing may well be the cause, you need to speak to your hosting company.

Simon.
0
 
hibbsusanAuthor Commented:
Ray, brilliant as always. Thank you so much. So much! :)
0
 
Ray PaseurCommented:
Thanks for the points!  Cheers, ~Ray
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.