The following sections provide some tips and tools that you can use for troubleshooting mail.
To verify aliases and determine whether mail can be delivered to a given recipient, type /usr/lib/sendmail -v -bv recipient and press Return. The command displays the aliases and identifies the final address as deliverable or not. The following example shows the output from this command.
% /usr/lib/sendmail -v -bv shamira@raks
shamira... aliased to mwong
mwong... aliased to shamira@raks
shamira@raks... deliverable
%
CAUTION
Take extra care to avoid loops and inconsistent databases when both local and domain-wide aliases are used. Be especially careful when you move a user from one system to another to avoid creating alias loops.
Use the following steps to run sendmail in test mode.
1. |
Type /usr/lib/sendmail -bt and press Return. Information is displayed. |
2. |
At the last prompt (>), type 3,0
e-mail-address and press Return. See Chapter 2, “Customizing sendmail Configuration Files,” for a complete description of the diagnostic information. |
To verify connections to other systems, you can use the mconnect program to open connections to other sendmail systems over the network. The mconnect program runs interactively. You can issue various diagnostic commands. See the mconnect(1) manual page for a complete description.
The following example verifies that mail to user winsor is deliverable. |
$ mconnect castle connecting to host castle (172.16.8.19), port 25 connection open 220 castle.Eng.Wellard.COM Sendmail 8.98.0+Sun/8.9.0; Tue, 19 Sep 2000 12:45:35 -0700 vrfy winsor 250 Janice Winsor <[email protected]> >
If you cannot use mconnect to connect to an SMTP port, check the following conditions.
Is the system load too high?
Is the sendmail daemon running?
Does the system have the appropriate /etc/mail/sendmail.cf file?
Is TCP port 25 (the port that sendmail uses) active?
Is the network connection down?
Is a firewall blocking the connection?
For other diagnostic information, check the following sources.
Look at the Received lines in the header of the message. These lines trace the route the message took as it was relayed, reading from the bottom up. Note that in the UUCP network many sites do not update these lines, and in the Internet the lines often get rearranged. To straighten them out, look at the date and time in each line. Remember to account for time zone differences, and beware of clocks that have been set incorrectly.
Look at messages from MAILER-DAEMON. These messages typically report delivery problems.
Check the system log that records delivery problems for your group of workstations. The sendmail program always records what it is doing in the system log. You may want to modify the crontab file to run nightly a shell script that searches the log for SYSERR messages and mails any that it finds to the postmaster.
Use the mailstats program to test mail types and determine the number of messages coming in and going out.
3.144.110.32