Sendmail: Command Line Alias Expansion

Posted January 13, 2004 by Michilimackinac in Sendmail

An alias allows sendmail to redirect mail to a specific address. The following commands shows how to expand this alias and expose the redirection.

The sendmail -bv command will expand the alias in the following format:

sendmail -bv

Assume an /etc/mail/aliases file that looks like this:

root: ricardo
postmaster: root

Now expose this through alias expansion and you will see the following:

# sendmail -bv postmaster
ricardo... deliverable: mailer local, user ricardo

The command will expand postmaster to root to ricardo. In this case, Sendmail does not tell you about any aliases in the middle (e.g. root in this example). This will expose if the mail is being redirected to another email address, a file, or being piped through another program.

The Conversation

Follow the reactions below and share your own thoughts.