Author: Kanwar Ranbir Sandhu
Date: April 14, 2005
When you install a Red Hat based GNU/Linux distribution, one of the packages installed by default is Sendmail. This is done so that system messages can be delivered to the root user. Some of the messages root receives includes messages like disk usage, remote login attempts, errors and so on aggregated by Logwatch. As alluded to here, Logwatch is a system log analyzer and reporter. Here's an excerpt from the Logwatch man page:
LogWatch is a customizable, pluggable log-monitoring system. It will go through your logs for a given period of time and make a report in the areas that you wish with the detail that you wish. Easy to use - works right out of the package on almost all systems.
This is great: a program that can look through the logs YOU want, HOW you want, and then report the bits you're interested in. The keyword here is "report". In order to do so, Logwatch mails the report to the root user, which is why Sendmail is installed by default, even on a desktop configuration. As long as you don't turn off the Sendmail service or remove the package all together, Logwatch will do its daily run, and then send its report to root's local mailbox in /var/spool/mail/root. A normal user cannot read root's email, but you can configure your system to have any and all messages destined to root to be diverted to your local mailbox instead.
You'll have to complete a two stage process in order to receive root's email in your Evolution Inbox. Here's what you do:
# Person who should get root's mail root:(The hash here represents the beginning of a comment in the file.)
root: parminderWhat this will do is redirect all messages destined for root's mailbox to your local mailbox. In this example, messages will now be delivered to /var/spool/mail/parminder
# newaliasesThis will rebuild the aliases database.
Now that root's email is aliased to your local mailbox, you need to configure Evolution to read the messages.
You're done! You'll notice in the Mail Account window that the Protocol listed for your new mail account is "mbox". This indicates that Evolution will be managing your local mailbox. Now when your system sends messages to the root user, Sendmail will use the alias you defined in /etc/aliases to deliver the mail to your local mailbox. Your Logwatch reports should now be picked up by Evolution for you to review. You can of course use any mail application to do this, so try Stage 2 with another client, such as Thunderbird.
I hope that was helpful. If you want to learn more about some of the applications mentioned in this How To, read the following man pages:
Thank you Kanwar!
This page was generously written and donated to the community by Kanwar Ranbir Sandhu.
* Content Last Updated 2005-04-14 by Kanwar Ranbir Sandhu
* Minor Grammer Last Updated 2008-02-24 by Dotan Cohen
* HTML Last Updated 2008-02-24 by Dotan Cohen
Use Evolution to read local mailbox Use Evolution to read local mailbox Use Evolution to read local mailbox
firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org