Amavisd Passed CLEAN Mails

Ever wanted to know what mails cleanly passed your postfix/amavis installation? Use the following statement to generate an overview for the current day.

prompt# TODAY=`date | perl -pe 's/....(......).*/$1/'` egrep "$TODAY.*Passed CLEAN" /var/log/maillog | perl -pe 's/.*(..:..).* (<.*>) ->.*Hits: (.*), size.*/$1 Hits: $3 $2/' | grep -v "Hits: -"

Output:
16:23 Hits: 2.957
Advertisement