Sed doesn't grok '[ \t]' -- it doesn't expand the \t :(

As there are no tabs in maillog, reduce the expression so that only spaces
are used.

Problem raised by:      Leif Neland root at internet dot dk
This commit is contained in:
brian 2005-01-12 01:31:21 +00:00
parent 393451f28c
commit 274b15afc6

View File

@ -51,7 +51,7 @@ case "$daily_status_mail_rejects_enable" in
done
cat /var/log/maillog
} |
sed -n -E "s/^$start"'.*ruleset=check_[^ \t]+,[ \t]+arg1=<?([^@]+@)?([^>,]+).*reject=([^ \t]*)[ \t].*[ \t]([a-zA-Z0-9_.]+)$/\2 (\3... \4)/p' |
sed -n -E "s/^$start"'.*ruleset=check_[^ ]+, +arg1=<?([^@]+@)?([^>,]+).*reject=([^ ]+) .* ([^ ]+)$/\2 (\3... \4)/p' |
sort -f | uniq -ic | sort -fnr | tee /dev/stderr | wc -l)
[ $rc -gt 0 ] && rc=1
fi;;