Install Logwatch on Ubuntu 12.04

First you need to install Logwatch, you can do this by typing the following in a terminal:

sudo apt-get install logwatch

Create a directory the Logwatch package in the repositories currently does not create, but is required for proper operation:

sudo mkdir /var/cache/logwatch

Configuration shouldn’t be edited in the install directory (/usr/share/logwatch). Copy logwatch.conf to /etc/logwatch before editing:

sudo cp /usr/share/logwatch/default.conf/logwatch.conf /etc/logwatch/conf/

Now you need to edit the configuration file

sudo nano /etc/logwatch/conf/logwatch.conf

Change the following information

Output = mail

Format = html

MailTo = test@test.com

You can now test if this works by running the following in the terminal window:

sudo /usr/sbin/logwatch --output mail