Redirecting root email on a self-administered computer
Linux computers often send important notifications to the system owner by email to root.
Unfortunately, without a little extra configuration, this generally ends up getting sent to firstname.lastname@example.org instead of the local mailbox on the machine itself,
This is a problem for us (as our root mailbox fills up with messages about your computer), and for you (as you miss important notifications).
If you get a mail from us asking you to redirect root mail on your machine, there's a couple of ways to do that:
- create a /root/.forward file containing the email address (strictly speaking, a mailbox) you want root email to go to. It's easiest to make this a local account i.e. it exists on your computer and is delivered without ever leaving localhost. If root's homedir isn't /root substitute root's $HOME
- edit /etc/aliases to point root to the email address you want root email to go to, then run newaliases
- prepend a '\' to the email address you want root mail to go to
- force localhost.localdomain to be handled locally by adding localhost.localdomain to /etc/mail/local-host-names
The Sendmail FAQ has notes on how you can test these changes are working correctly.
If these do not work, you will need to consult the documentation for your particular setup.
For Fedora modify /etc/mail/local-host-names and add (just to be safe):
localhost localhost.localdomain host host.ai.cse.unsw.edu.au (if you have your own subdomain) host.cse.unsw.edu.au