Setting up Logwatch to email logs using Gmail
I thought I would share this quick guide to setting up sending yesterdays logs without needing to install Sendmail or another heavy weight email client.
Step 1. Install our lightweight SMTP client.
sudo apt-get install ssmtp
Step 2. Configure our client to talk to Gmail.
The config for Gmail should look like this:
Step 3. Check your configuration works
Now press ctrl-d and you should see something like this:
You also should receive an email.
Step 4. Install Logwatch.
Step 5. Check if logwatch works with ssmtp.
You should now get an email containing yesterdays logs. Last Step! setup a cron task to send your logs every day.
Your task should look like this: