Skip to content

Linux

Setting up msmtp

For a long time I struggled with setting up cronjobs properly. It always took a lot of trial and error. Most of the times this was due to an environment problem (or a typo). You could test your cronjob using a script or saving the command output to a file but it is still cumbersome. At the same time, it would also be nice to be notified whenever something goes wrong, such as your backup script failing all of a sudden.

In this post I explain how to set up msmtp so that your system will send you emails.