blob: 4a29b47bf6386cc2c8e1a8355b0eb7efa822b43f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/sh
#
# $FreeBSD$
#
if [ -d /etc/mail -a -f /var/log/maillog ]; then
echo
echo Checking for rejected mail hosts:
start=`date -v-1d '+%b %d' | sed 's/0\(.\)$/ \1/'`
zcat -fc /var/log/maillog.0* /var/log/maillog | grep reject= |
perl -ne "print \"\$2\n\"
if /^$start.*ruleset=check_\S+,\s+arg1=(<[^@]+@)?([^>,]+).*reject=/o;" |
sort | uniq -c | sort -nr
fi
|