Skip to content

Instantly share code, notes, and snippets.

@bngsudheer
Created January 21, 2011 11:19
Show Gist options
  • Save bngsudheer/789548 to your computer and use it in GitHub Desktop.
Save bngsudheer/789548 to your computer and use it in GitHub Desktop.
Postfix bounce count for the day by domains
#!/bin/bash
domains="aol\.com yahoo\.com gmail\.com hotmail\.com"
datepart=`date "+%b %d"`
for domain in $domains
do
echo $domain
egrep "${datepart}.*${domain}.*bounced" /var/log/maillog | wc -l
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment