How to receive or forward root emails in Linux

I find the following way the easiest way to manage who gets root's emails.

Open the file /etc/aliases for editing
vi /etc/aliases
Go to the bottom of the file where you see something similar to :
 # Person who should get root's mail
 #root:          marc
Change marc to the email address of the user who should get the email and finally uncomment the line. So for example your last two lines of /etc/aliases should look like:
# Person who should get root's mail
root:          you@yourcompany.com
Last step is to issue the following command ro reload /etc/aliases
newaliase

No comments:

Post a Comment