At times it is desirable to run sendmail so that it does not perform aliasing. When aliasing is disabled, sendmail uses the recipient address as is. No addresses are ever looked up in the aliases file, even if they are local.
switch tells sendmail not to perform aliasing of
recipient addresses. This switch is rarely used but can be handy in a
couple of situations.
In tracking down local delivery problems, it can be difficult to determine where the problem lies. If you suspect a bad alias, you can force aliasing to be skipped and see whether that causes the problem to go away:
/usr/sbin/sendmail -n user < /dev/null
This tells sendmail to send an empty mail
message (one containing mandatory headers only) to the recipient
sendmail from looking up
either in the aliases database or in that
user’s ~/.forward. If
user resolves to the
delivery agent, the message will be delivered, and you should
therefore suspect an aliasing problem.
Other switches, such as
-v (verbose) and
-d (debugging), can be combined with
-n to view the delivery process in more detail.
-n command-line switch can also be used to suppress aliasing when delivering to a list of recipients that has already been aliased. For example, consider the following script, which attempts to restrict delivery to users who have mail delivered locally and to skip users who have mail forwarded ...