sendmail aliases

Discussion in 'Sendmail' started by popowich, Nov 19, 2008.

  1. popowich

    popowich EQ Forum Admin Staff Member

    Aug 12, 2008
    Likes Received:

    Sendmail aliases allow sendmail to take an e-mail and optionally forward it, write it to a file, or run it through another program.

    The sendmail aliases file is usually found at /etc/aliases, but it can also be commonly found at /etc/mail/aliases

    An example of a forward can be found in the default /etc/mail/aliases file:

    # RFC 822 requires that every host have a mail address "postmaster"
    postmaster : root

    This is an example of directing e-mail to a file.

    In this case, it is being deleted by directing it to a special device known as /dev/null
    # Aliases to handle mail to msgs and news

    nobody : /dev/null

    An example of piping an email to a program is:

    support: |/path/to/your/support-program

    To create a mailing list separate multiple addresses with a comma:

    # help mailing list

    To make the aliases file changes live run the command: newaliases

    Last edited: Nov 7, 2019

Want to reply or ask your own question?

It only takes a minute to sign up (and it's free!). Click the orange sign up button to choose a username and then you can ask your own questions on the forum.