A new configuration variable, daily_status_mail_rejects_shorten, allows
the rejected mail reports to tally the rejects per blacklist without providing details about individual sender hosts. The default configuration keeps the reports in their original form. MFC after: 1 week
This commit is contained in:
parent
c9a8a65b69
commit
1484f84905
@ -127,6 +127,7 @@ daily_status_security_enable="YES" # Security check
|
||||
# 460.status-mail-rejects
|
||||
daily_status_mail_rejects_enable="YES" # Check mail rejects
|
||||
daily_status_mail_rejects_logs=3 # How many logs to check
|
||||
daily_status_mail_rejects_shorten="NO" # Shorten output
|
||||
|
||||
# 470.status-named
|
||||
daily_status_named_enable="YES"
|
||||
|
@ -11,6 +11,13 @@ then
|
||||
source_periodic_confs
|
||||
fi
|
||||
|
||||
case "$daily_status_mail_rejects_shorten" in
|
||||
[Yy][Ee][Ss])
|
||||
sed_output='\4 \3...';;
|
||||
*)
|
||||
sed_output='\2 (\3... \4)';;
|
||||
esac
|
||||
|
||||
case "$daily_status_mail_rejects_enable" in
|
||||
[Yy][Ee][Ss])
|
||||
if [ ! -d /etc/mail ]
|
||||
@ -51,7 +58,7 @@ case "$daily_status_mail_rejects_enable" in
|
||||
done
|
||||
cat /var/log/maillog
|
||||
} |
|
||||
sed -n -E "s/^$start"'.*ruleset=check_[^ ]+, +arg1=<?([^@]+@)?([^>,]+).*reject=([^ ]+) .* ([^ ]+)$/\2 (\3... \4)/p' |
|
||||
sed -n -E "s/^$start"'.*ruleset=check_[^ ]+, +arg1=<?([^@]+@)?([^>,]+).*reject=([^ ]+) .* ([^ ]+)$/'"$sed_output"'/p' |
|
||||
sort -f | uniq -ic | sort -fnr | tee /dev/stderr | wc -l)
|
||||
[ $rc -gt 0 ] && rc=1
|
||||
fi;;
|
||||
|
Loading…
Reference in New Issue
Block a user