Linux Tips : SSMTP – sending emails from Linux system

I’ve now been using Manjaro Linux since the start of 2020

So far so good, I’m getting used to the way it works. Linux quirks that can be a real pain to learn or get used to. Coming from Windows after using it for over 30 years. I’m pleased with it.

Unlike Windows it’s harder to use, to modify or create files, folders in certain places/folders etc can be a real pain…. because of Linux’s security, I suppose it’s a good thing, but wrapping you head around how to modify a dopey file or just add a line can be more than just a pain in the ass.

In a these posts, I’m trying to write down things that I found hard to do or learn, or very time consuming to do, so hopefully they maybe of some use to someone.

This tip is how to get my Cron to send an email when the job has been completed (in my case a backup every hour from 9h – 22h, sadly as with many Linux’s programs this is far from easy.

I first had to install ssmtp, this the easy part…

Once installed you will find a folder at /etc/ssmtp/
Inside will be two files, ssmtp.conf & revaliases. As usual these have only root permissions and so you need to modify them as root and not as user.

In the conf file once open you just need to paste the following under the line # The full hostname (for info when a line has a # in front of it, this means that it’s a commented line not a command line)

Paste this

I’ll try and explain what needs to be modified in the above lines

user-manjaro (open a terminal, type hostname replace with your gmail address
AuthPass=123456 need if you use gmail with 2FA, you have to create a special password under gmail security’s settings to let ssmtp / Linux send yurself mails (

So once these details have been sent you can modify the second file Revaliases
Paste this

Once this has been done, you can modify your cron file and instead of


Now when your cron job runs, you will receive a mail, sadly the subject of the cron command line , it’s long and a mess : but it’s better than nothing

Email subject line : Cron <root@usermanjaro> root rsync -avhW /home/trevor/Documents/* /run/media/trevor/BackUp_1/Copy_trevor_home_documents