Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

These are the contents of '/etc/aliases' file on my Debian (Wheezy) server, as it is:

# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: t

1. I noticed that, by default, my server sends email from what looks like root@hostname.domain.com. So, which one of the rules above governs this? postmaster: root;?

2. So, the rules in '/etc/aliases' are used to assign users to specific departments? That is, for example, all emails to be sent/received for 'abuse' will be delivered from/to root@hostname.domain.com (which'd be the default email for root, unless there's an alias). Correct?

3. Can someone please explain what each of these really meant for -- mailer-daemon, postmaster, nobody, hostmaster, usenet, news, webmaster, www, ftp, abuse, noc, security, root?

I mean, a description like "mailer-daemon for sending email delivery errors, but not really meant for receiving emails. security for where people should contact your about security issues", or something like that.

As obvious as it should be by now, this is a newbie question. So, please try to be as clear as possible.

share|improve this question
Perhaps you should split up your question into several ones. –  Nils Feb 17 '13 at 21:16

1 Answer 1

up vote 9 down vote accepted

The /etc/aliases file is part of sendmail. It specifies which account mail sent to an alias should really be delivered to. For example, mail to the ftp account would be sent to root's mailbox in the configuration you show.

Multiple recipients can be specified as comma-separated lists, too.

Redirecting mail to users isn't all that can be done. Mail can be piped to programs, too, or simply directed into a file of your choice. The following would "bit-bucket" all mail from the user "somebody":

somebody : /dev/null

Modifications to the /etc/aliases file are not complete until the newaliases command is run to build /etc/aliases.db. It is in this later form that sendmail actually uses.

share|improve this answer
So, is there a security daemon too? ('security' is listed in /etc/aliases.) When exactly is it triggered? –  its_me Feb 16 '13 at 20:16
More generally it specifies to whom mail should be delivered when addressed to the alias on this host. Mail to ftp would be delivered to the root mailbox. Although it is often used to redirect locally generated/delivered mail to somewhere useful it works for email from anywhere and from anyone, if accepted by sendmail and the config says to use the alias file. –  Matt Feb 16 '13 at 20:17
You should use ` character instead of ' at the last paragraph. –  Mateusz Jagiełło Feb 16 '13 at 20:17
Nearly every modern *nix MTA is sendmail compatible. The existence of /etc/aliases does not mean it uses sendmail. Postfix and exim4 both use /etc/aliases as well. –  jordanm Feb 17 '13 at 4:15
@mindthemonkey: (... and JRF) What is the significance of the last line (I guess the OP's username is t)? Also, although I have /etc/aliases, I don't have /etc/aliases.db, and newaliases gives me the following (error) message: p11-kit: duplicate configured module: gnome-keyring-module: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so. –  Emanuel Berg Feb 18 '13 at 3:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.