This command scans the qpsmtpd log files closed in the last 3 days and counts the number of messages blocked by each DNS block list. The count (and the displayed value) is based on the content after "http://" and before the third "/" in the message section of the the log entry.
+
This command:
−
<nowiki>awk -F"[\t]" ' /logterse.*dnsbl/ \
+
* asks you how many days of logfiles to scan
+
* scans the logfiles closed in the days specified
+
* counts the number of messages blocked by each DNS list that blocked an email.
+
+
The count (and the displayed value) is based on the content after "http://" and before the third "/" in the message section of the the log entry (which frequently differs from the value specified in the config db).
+
<nowiki>if [ -z $DAYS ]; then DAYS=1; fi; \
+
echo -n "Days of logfiles to scan [$DAYS]: "; read NEWDAYS; \