diff options
-rwxr-xr-x | mailman/cron.daily/local-mailman | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mailman/cron.daily/local-mailman b/mailman/cron.daily/local-mailman new file mode 100755 index 0000000..c8e416b --- /dev/null +++ b/mailman/cron.daily/local-mailman @@ -0,0 +1,14 @@ +#!/bin/sh + +#set -e + +stem=/var/log/mailman/smtp + +# no smtp traffic for at least 24 hours means logfiles are empty +logsizes=$(find /var/log/mailman \( -name smtp -or -name smtp-failure -or -name smtp.1 -or -name smtp-failure.1 \) -printf '%b\n' | sort -u) + +if [ 0 = "$logsizes" ]; then + service mailman stop + slay list + service mailman start +fi |