# Basic system aliases -- these MUST be present. mailer-daemon: postmaster postmaster: root # General redirections for pseudo accounts. bin: root daemon: root adm: root lp: root sync: root shutdown: root halt: root mail: root
You can add other aliases to this file by simply inserting a line with the name: redirectedname format. To create an address john that emailed a user bob you could add the line:
john: bob
You can also have multiple addresses on the same line:
admin: dave,bob,sara
Not only can you direct mail to another user, but you can direct mail to a forward list or a program. This is how you would do a forwarding list:
admin: :include:/etc/admin.list
To forward to a file use a line a bit like this:
admin: "| /root/admin.pl"
All of this can also be done easily with mailconf using the user alias option. With the aliases that forward email to programs and lists you need to be careful. A list might have an email that bounces. If it bounces then you might get the bounced letters forwarded to everyone on the list. That could cause a crazy email storm. With a program you need to make sure it is written correctly because the program with run with more rights then an ordinary user. This could get dangerous if you mess up. It is fun to play with and basically harmless on a small server.