Any user, including root, can forward their local email by putting the forwarding address in a file called
~/.forward. You can have multiple addresses there, all on one line and separated by comma. If you want both local delivery and forwarding, put
root@localhost as one of the addresses.
The system administrator can define email aliases in the file
/etc/aliases. This file contains lines like
root: firstname.lastname@example.org, /root/mailbox; the effect is the same as having
email@example.com, /root/mailbox in
~root/.forward. You may need to run a program such as
newaliases after changing
Note that the workings of
/etc/aliases depend on your MTA. Most MTAs implement the main features provided by the traditional sendmail, but check your MTA’s documentation.
/root/.forward and place your email address in this file. It will be forwarded to your external mail address.
If you are using the Postfix MTA and own your own domain (example.com), you can configure it to forward to
firstname.lastname@example.org alongside any other user account.
main.cf configuration file, or with the overrides in
master.cf set the following options:
mydomain = example.com mydestination = localhost.localdomain, localhost, local.$mydomain # Basically, anything but $mydomain
This will have Postfix treat mail to your root account as
email@example.com and route it accordingly, whether relay to your
relayhost or deliver it to example.com directly. With this configuration Postfix will deliver mail to
firstname.lastname@example.org to your local mailbox (
/var/mail/root or wherever your system delivers system mail).