11 lines
434 B
Bash
Executable file
11 lines
434 B
Bash
Executable file
#!/bin/bash
|
|
# $Id: policyd-550.sh 16 2009-04-28 12:51:28Z oli $
|
|
#
|
|
# Shows all mails rejected by policyd-weight.
|
|
# Requires that $REJECTMSG in /etc/policyd-weight.conf
|
|
# contains "550 Mail"
|
|
|
|
LOGFILE="/var/log/mail.log"
|
|
|
|
echo -e "Score\tRecipient\t\tSender"
|
|
grep -B1 '550 Mail' $LOGFILE | awk -F'<' '{print $4,$5}' | grep 'rate:' | sed -r -e 's/(to|from)=//g' -e 's/(>|;)//g' -e 's/rate: //g' | awk '{print $3"\t"$2"\t\t"$1}' | sort -n
|