Changes

Jump to navigation Jump to search
32 bytes added ,  18:55, 8 July 2014
Line 153: Line 153:  
===Count messages denied by each DNSBL Block List===
 
===Count messages denied by each DNSBL Block List===
 
This command scans all qpsmtpd log files closed in the last day 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 scans all qpsmtpd log files closed in the last day 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.
awk -F"[\t/]" ' /logterse.*dnsbl/ {count[$10]++;} END {for (j in count) print count[j] "\t" j;}' $(find /var/log/qpsmtpd -ctime -1 -type f)
+
  awk -F"[\t]" ' /logterse.*dnsbl/ { split($8,msg,"/"); svc=msg[3]; count[svc]++;} END {for (j in count) print count[j] "\t" j;}' $(find /var/log/qpsmtpd -ctime -1 -type f)
 
----
 
----
 
[[Category:Howto]]
 
[[Category:Howto]]
 
[[Category:Administration:Monitoring]]
 
[[Category:Administration:Monitoring]]
 
[[Category:Mail]]
 
[[Category:Mail]]

Navigation menu