Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Some emails sent via mail() on my server are not reaching their destinations. I've checked the mail logs and I have no log entries since Aug 5th. I'm not sure where to begin looking into what might be the problem. I have confirmed that some mails are being sent/received.

share|improve this question
What is your OS ? – Prix Aug 12 '10 at 21:12
up vote 0 down vote accepted

Verify your mail log

using your preferable editor open /var/log/mail.log or /var/log/mail of if you want to see just the last entries you can use tail -f /var/log/mail, you can aswell send an email and run the tail command to follow it.

Verify if sendmail is up and running

ps -auxf |grep sendmail

Stop and restart sendmail to make sure you have no error within it and to flush your db

/etc/init.d/sendmail stop
/etc/init.d/sendmail start

NOTE: This command may differ from OS to OS;

Verifying Address Resolution and Aliasing

/usr/sbin/sendmail  -bv  -v  -oL10  address [address...]

The -bv (verify mode) option causes sendmail to verify addresses without collecting or sending a message.

The -v (verbose) flag causes sendmail to report alias expansion and duplicate suppression.

The -oL10 (log level) option sets the log level to 10. At log level 10 and above, sendmail -bv reports the mailer and host to which it resolves recipient addresses.

For hosts that resolve to IPC mailers, MX hosts are not reported when using verify mode, because MX records are not collected until delivery is actually attempted.

If the address is not being resolved as you expect, you may have to modify one or more of the following:

  • The sendmail configuration file.
  • The files or programs from which file classes are generated.
  • The name server configuration.
  • The UUCP configuration.

More detailed information about how the configuration file is rewriting the recipient addresses is provided by address test mode:

/usr/sbin/sendmail -bt

Contacting the sendmail Daemon to Verify Connectivity

It is possible to talk to the sendmail daemon and other SMTP servers directly with the following command:

telnet  host  25

This can be used to determine whether an SMTP server is running on host. If not, your connection attempt will return "Connection refused."

Once you establish a connection to the sendmail daemon, you can use the SMTP VRFY command to determine whether the server can route to a particular address. For example,

telnet 25
220 SMTP server ready
vrfy webnet
250 Webnet <>
554 unable to route to domain
221 SMTP server shutting down

Not all SMTP servers support the VRFY and EXPN commands.

share|improve this answer

You might want to use something like tshark to confirm that data is leaving your box to be delivered. If you have one available, try using a smarthost, preferably the one for your ISP, and also, take a look at SRV records

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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