Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Regarding this exim /etc/aliases man page

I am not sure how /etc/aliases works. The

   The file should contain lins of the form
   name: address, address, ...

I looked in /usr/share/doc/exim4-base/spec.txt.gz, but all I want is an example of the format of the aliases.

Is it


Where root is the login username on the Linux system, and the aliases that trail after it are (email addresses that go to root's inbox)

Or is it

root:  bobjoe, Robbiejoe

Where the domain name is left out.. so the alias file doesn't care about domain..??

And so how can you route to the root user?

share|improve this question
up vote 5 down vote accepted

/etc/aliases is used to redirect mail for users in the local domain (the domain the exim4 server belongs to). Therefore, if you were to have a line like

joe:, josephine@some.where.else
then email addressed to joe (and joe being a local user on the mail server) would be sent to the other two email addresses instead.

If you want to redirect email addressed to to root, then you would first of all need to make sure that your mail server is configured to process messages for the domain (i.e. has to be a relay domain, and the MX records for it have to point to your mail server), and then (if you wanted to use /etc/aliases) bobjoe would need to have a local account, plus you need a line in /etc/aliases of the form

bobjoe:   root

For mail servers with hundreds of users that would be a real pain in the backside, so I would recommend using other methods of aliasing, e.g. vexim.

share|improve this answer
Thank you for understanding the root of my question! – bobobobo Aug 21 '10 at 19:08
So, if I'm using exim, and some.where.else cannot be entered under "local domains"? – bobobobo Aug 21 '10 at 20:40
They could, but then forwarding email like this wouldn't make sense. You would then simply forward to joseph and josephine. By default exim is not configured for multiple virtual mail domains, so all users would only have exactly one local mailbox. All of this can be configured, but that would go way beyond the initial scope of your question. – wolfgangsz Aug 21 '10 at 21:20
Ah, ok. I am now following – bobobobo Aug 21 '10 at 21:26
Well, my friend, welcome to the wonderful (and sometimes confusing) world of exim users. If you really want to run your own mail server, you will do a lot of reading over the next few days or weeks. – wolfgangsz Aug 21 '10 at 21:31

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.