This How To Logwatch Email Notification helps to properly configure receiving emails send by Logwatch automatically. The good message is, configuring email notifications is very easy.
Furthermore, this how to assumes that you have sendmail running on your system.
To enable your Logwatch sending emails, you first like to find your logwatch.conf file. This is key, because this is the file in which you need to change the configuration to enable Logwatch sending emails to you. Next to other options, below two options that you can use to find your logwatch.conf.
find / -name logwatch.conf
Once you identified you found your logwatch.conf file, in my case it is “/usr/share/logwatch/default.conf/logwatch.conf”, than you can start editing it by executing
Within your logwatch.conf config file, you need in a minimum to edit the following parameter:
MailTo = YOURemailAddress@YOURdomain.com MailFrom = YourSenderEmailAddress@YourDomain.com Detail = SelectYourDetailLevel mailer = "/usr/sbin/sendmail -t"
As for the parameters:
- MailTo: Select the email address to which you like Logwatch to send emails
- MailFrom: Type the email address that should show up as the sender email address
- Detail: Select the level of detail for the reporting. Can by “Low”, “Med” or “High”
- Mailer: Select the mailer installed on your system. In my above example its “/usr/sbin/sendmail”. If you have a different mailer, then you need to update this line
Once these parameters were updated correctly, then you are done. Enjoy!
Install Logwatch by executing the following:
apt-get install logwatch
Install sendmail by executing the following:
apt-get install sendmail