Last active
August 7, 2023 14:28
-
-
Save bmatthewshea/20a8f7f4f71874722d7e7de7ddb605d0 to your computer and use it in GitHub Desktop.
pflogsumm cron.daily script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Save this script as: | |
# `/etc/cron.daily/pflogsumm` | |
# It should be owned by root. | |
# Then set permissions: `sudo chmod 755 /etc/cron.daily/pflogsumm` | |
# the script will also run directly if you wish to test it. | |
# Brady Shea 31Jul2023 | |
test -x /usr/sbin/pflogsumm || exit 0 | |
/usr/sbin/pflogsumm -d yesterday --problems_first /var/log/mail.lo* \ | |
| mail -a 'From: Daily Postfix Report <[email protected]>' -s "MYDOMAIN.COM Email Server Activity Report" [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: The file name has ".sh" on it simply to allow highlighting correctly. Read the comments at top of script as to how to save it.