Take the tour ×

We have a Drupal website on a Linux server, it is using mail() to send mail through PHP. I think that would be using PHPmailer and sendmail.

Domain is www.myclientdomain.com and we can receive email from the website all day long. To our email, to our Gmail, everything is great.

However, they cannot receive any email from the web server. Email is being sent as no-reply@myclientdomain.com

They are running Exchange I believe and we have an SPF record in place but that doesn't seem to be helping at all.

How can I best simulate sending an email from the server, and testing what their mail server is responding with. What tools can I use to see some logs, or get to the root of this issue? I am not getting much help from their Exchange admin, doesn't appear that it is ever hitting their Exchange so something before it may be squashing it.. Barracuda, who knows.

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

When I have seen this happen, it is almost always because the mail is being delivered locally. Your Drupal web server hosting myclientdomain.com does not know that myclientdomain.com's email is being hosted externally.

You should be able to quickly verify this by looking at the /var/log/maillog or mail.log or exim_main.log or whatever the mail log is named in your distro.

Another very useful tool is telnet. You can telnet from your Drupal server into your Exchange server and simulate an SMTP connection. This will let you see what messages the Exchange server is sending back and will also verify if you can, indeed, get proper email delivered to that Exchange server.

A good quick tutorial on how to do a manual SMTP session via telnet is here:


Good luck!

share|improve this answer
Outstanding! You were correct with it not being sent off the box. Hasn't happened with other clients on that machine but was certainly the issue. Thanks –  Ryan Doom Dec 16 '11 at 15:52
Happy to help. It's a silly error that happens a LOT, but it's really non-obvious what is happening at first. –  jdw Dec 16 '11 at 15:54
add comment

The telnet approach mentioned in jdw's answer is the preferred method, especially since you can initiate it directly from the sending server. The other thing to check is whether you have a reverse PTR record on the server's public/outgoing IP.

share|improve this answer
add comment

See also mail hosted at Google, web server elsewhere

share|improve this answer
add comment

Your Answer


