I'm seeing a very low percentage of misdelivered emails from my sendmail host. My sendmail server will try to email an address like "john.dough@johndoughs.own.domain.example.com" and the email will actually be delivered to "john.dough@myexample.com" (which is my domain, the sendmail application is running on that webserver and is the email originator/sender domain.)

I've noticed this only happens for small and "weird" domains, which makes me guess that somehow the mail is undeliverable to the small domain because it's mail service is down, but just a total guess.

Has anyone seen this happen before? How can I diagnose and fix the problem?


I've said this before, but unless you have a very very very good reason for running Sendmail, like you have a huge legacy install, you would be significantly better off moving your mail setup to a modern MTA like Exim, Postfix, or hell, even QMail. It may take a little time to convert, but you'd save considerable time in the long run with easier debugging and configuration changes.

Having said that, I'm assuming that myexample.com destination is the webserver in question. It would appear that Sendmail is considering the original domain as a local domain and the server should be the final destination. What may be happening is that the original domain has a broken MX record that points to I've seen a number of logs on servers I run that warn about domains pointing localhost, when they're not listed as local domains.

I'd check what result you get from

dig MX johndoughs.own.domain.example.com

If it's, then that would be your answer.

I am clutching at straws.

  • The domains that fail seem to have a blank dig MX. How could I work around these errors? Does it mean users with those emails just never receive any email? – MikeN Oct 17 '09 at 17:17
  • If they don't have an MX record, and there's no A record for the domain, then the mail is pretty much undeliverable and there's not much you can do about it. – David Pashley Oct 18 '09 at 9:49

I would echo David's suggestion of replacing sendmail with something like Postfix. However, for debugging purposes, can you grab the logs of one of the "weird" emails?

grep 'john.dough' /var/log/maillog

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.