Man page for the aliases file. Should be in /etc/mail. You'd need to run newaliases after that, but I'm pretty sure webmin lets do all this (modify /etc/mail/aliases, run newaliases to recreate the database, and restart sendmail).
From the aliases manpage:
aliases - aliases file for sendmail
This file describes user ID aliases used by /usr/sbin/sendmail. The file resides in /etc (*WARNING, this came from an old install. The file should be in /etc/mail) and is formatted as a series of lines of the form
name: name_1, name2, name_3, . . .
The name is the name to alias, and the name_n are the aliases for that name. Lines beginning with white space are continuation lines. Lines beginning with `#' are comments.
Aliasing occurs only on local names. Loops can not occur, since no mes*sage will be sent to any person more than once.
That's about it. It's really the easiest way to do it, as long as both users are local. I think the aliases mechanism is always part of sendmail, as opposed to the 'virtusertable' way that would allow you to send the message to a remote user, but might require you to recompile sendmail.
I did, often, and beleive me, for the first time it's hours and hours of fun
- prime [[email protected]]
ExclaimHosting - Your voice on the web.
Fast, reliable hosting, at prices you can afford.
If you are wanting to forward all mail sent to one of your email addresses to two or more addresses/accounts it is much simpler than if you are wanting to forward mail from certain senders differently than other mail to that same address.
What you probably want to do... (depending somewhat on your sendmail configuration) is to add an entry for the [email protected] you want to redirect in /etc/virtusertable, pointing to an alias (in /etc/mail/aliases) which will define the accounts and/or external addresses to which you want the mail forwarded.
you will need to rebuild virtusertable db and run newaliases for the changes to take effect. (I'm not how much of that webmin will take care of for you if you use webmin to make the changes) The example above would forward all mail sent to [email protected] to the three recipients specified by alias23. (the local user "user2", and joe and sally at their respective external addresses.
If you instead want to handle mail from a specific sender separately that you do all other mail sent to the same address, this won't work, and you will need to pipe all of the mail through some kind of filter, such as procmail.