FreeBSD & MacOSX ship with the the periodic(8) utility, which is a neatly organized set of utilities to periodically run system functions like ZFS filesystem checks, security checks, checking for out of date ports, etc.
The problem is that periodic sends too many emails which contain too much superfluous information. This causes people to ignore the emails, and we miss many problems picked up by periodic(8). The Daily emails are sent once per day, the security emails are sent once per day, and the weekly & monthly emails are also sent periodically. These emails have a subject line like one of these:
Subject: $HOSTNAME daily run output
Subject: $HOSTNAME security run output
Subject: $HOSTNAME weekly run output
Subject: $HOSTNAME monthly run output
How can I reduce the amount of email sent from periodic(8)?
I'll post my own answer below, but I would like to see what others have done.
Note: I have a similar question regarding Linux, at Linux: logwatch(8) & cron.daily is too noisy. How can I control the noise level?
Best Answer
Place something like the following in /etc/periodic.conf .
The following configuration will reduce the noise in the emails. If these messages are blank, then periodic(8) will not send an email. In addition, the security emails will be included with the daily emails, which also reduces noise.
The above example will get you 90% there. However, there is one additional problem which cannot be resolved using the standard FreeBSD config (as of 20110601). The script at
/etc/periodic/daily/450.status-security
will still print the following pointless message:The fix is to apply the patch found in http://www.freebsd.org/cgi/query-pr.cgi?pr=138692 . This patch will modify the return codes for 450.status-security, so that extra messages won't be printed.