Install and Setup Logwatch on Ubuntu

I installed the program logwatch. A little confusing at first. This is mostly so I don’t forget. I thought it could help others.  An excellent tool for auditing an Ubuntu system.

sudo apt-get install exim4

I prefer EXIM4, however some people like Postfix. Setting up EXIM4 and Postfix is beyond the scope of this logwatch thread.

dpkg-reconfigure exim4-config
sudo apt-get install logwatch
sudo nano -w -W /usr/share/logwatch/default.conf/logwatch.conf

Use nano to change the following settings.

#To make Html the default formatting Format = html
Format = html
# Default person to mail reports to.  Can be a local account or a
# complete email address.  Variable Output should be set to mail, or
# --output mail should be passed on command line to enable mail feature.
MailTo = user@example.org
# Default person to mail reports from.  Can be a local account or a
# complete email address.
MailFrom = user@ubuntu.org
sudo logwatch --html_wrap 80 > logwatch.html

When done, open logwatch.html in your home dir. Example /home/nate/logwatch.html, should open in your web browser. Everything should work. Now you will need to wait 12 to 24 hours for an email from logwatch. Check your spam box too if you missed it. Be sure to add logwatch to your email address contact list.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s