Debugging sendmail

The -b switch instructs sendmail to "Become"/operate in a mode.
The -d0 switch, instructs sendmail to produce debugging information.
The level .11 prints more information than the default level of .1 .
The -bp switch instructs sendmail to print the contents of the queue.

$ sendmail -d0.11 -bp

You can verify aliases with the -bv switch:

$ sendmail -bv root

To run sendmail verbosely, use the -v switch:

$ cat /dev/null | sendmail -v root

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sendmail host name lookup failure

Check that sendmail resolves corresponding dns with:

echo "/mx smtp.domain.tld." | sendmail -bt -d8.8
echo "/map host smtp.domain.tld." | sendmail -bt -d8.8

If using SMART_HOST which does not resolve or has no MX record, then make sure to include the host/IP with square brackets and sendmail will not try to do a dns lookup, else you would get "host name lookup failure" in maillog.

In "sendmail.mc":

define(`SMART_HOST', `[smtp.domain.tld]')dnl

Apply the config:

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Restart Sendmail:

service sendmail restart

Comment