3

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 [email protected]

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.

3 Answers 3

4

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:

http://www.networkclue.com/internet/smtp/manual-test.aspx

Good luck!

2
  • 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, 2011 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, 2011 at 15:54
0

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.

0

See also mail hosted at Google, web server elsewhere

1
  • 2
    We really do prefer that answers have content, not pointers to content. This may theoretically answer the question however, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – user9517
    Dec 17, 2011 at 8:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .