Creating a wiki page on root email
Posted: Mon Nov 22, 2010 5:35 am
I was looking at:
http://wiki.amahi.org/index.php/Monitor ... via_E-mail
and it tells you to edit /usr/share/logwatch/default.conf/logwatch.conf to get the logwatch email to go to someplace other than root.
The problem with this recommendation is that there are MANY cron outputs to root that you want to go elsewhere and there are two ways to get email for root to go to the email account of choice:
Create the file /root/.forward
It has a single line with the email where you want root's email to go to.
Edit cat /etc/aliases
Edit the last line:
#root: marc
By removing the # and replacing 'marc' with the targetted email address. Then run 'newaliases'.
The alias file is processed before the .forward file. These methods are fairly similar for simple uses. If you want to get fancy, you better read up on each and choose your preference. I have used both; but never both on a single system.
This is much better instructions than changing the MAILTO for logwatch, and then for cron, and anacron, and...
http://wiki.amahi.org/index.php/Monitor ... via_E-mail
and it tells you to edit /usr/share/logwatch/default.conf/logwatch.conf to get the logwatch email to go to someplace other than root.
The problem with this recommendation is that there are MANY cron outputs to root that you want to go elsewhere and there are two ways to get email for root to go to the email account of choice:
Create the file /root/.forward
It has a single line with the email where you want root's email to go to.
Edit cat /etc/aliases
Edit the last line:
#root: marc
By removing the # and replacing 'marc' with the targetted email address. Then run 'newaliases'.
The alias file is processed before the .forward file. These methods are fairly similar for simple uses. If you want to get fancy, you better read up on each and choose your preference. I have used both; but never both on a single system.
This is much better instructions than changing the MAILTO for logwatch, and then for cron, and anacron, and...