Redirecting root email

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 can end up getting sent to instead of the local root user.

This is a problem for us (as we get constant messages about your computer), and for you (as you miss important notifications).

If we ask you to redirect root mail on your machine, the process is fairly straightforward.

Redirecting to your UNSW mail

  • Edit /etc/aliases, adding a line like root:, substituting your own zID as appropriate.
  • Run newaliases to make the changes active

Redirecting to a local mailbox

If you store mail in a local mailbox on your linux machine (fairly uncommon these days), you can forward root mail there.

Just create a /root/.forward file containing the username that root mail should go to.

If this doesn't work, try:

  • prepending 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

If these don't work either, you'll 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 hostname (if you have your own subdomain) (...substituting the computer's hostname for hostname)
Last edited by Computing Support Group 17/04/2020

Tags for this page:

redirecting, root, email