Monitoring: check that /var/mail/ is empty
Originally created by @intrigeri on #11480 (Redmine)
We constantly forget to add email redirects for new users we create,
e.g. those that run cronjobs. So their mail lands into /var/mail/
. And
then, we have two problems: we don’t learn about problems, and
/var/mail
can use lots of disk space. I’ve just fixed a few such
problems again, and I’ve grown tired of constantly catching them after
the fact. IMO we should add a check that monitors that /var/mail/
is
empty (or alternatively, configure Postfix to send all email to root,
unless they are sent to an alias that has a fully-qualified domain
part).
This does require a bit of shell (or whatever) scripting knowledge, and reading the documentation about adding new Icinga2 checks in our infrastructure. The Puppet part can be handled by our sysadmin team if this is a blocker for a contributor to work on that ticket.