Changes

Jump to navigation Jump to search
492 bytes added ,  19:03, 8 July 2014
One-line command to count messages blocked by each block list.
Line 149: Line 149:  
===[[Qpsmtpd_connection_time]]===
 
===[[Qpsmtpd_connection_time]]===
 
See [[qpsmtpd_connection_time]]
 
See [[qpsmtpd_connection_time]]
 +
 +
==Useful Commands==
 +
===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.
 +
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)
 
----
 
----
 
[[Category:Howto]]
 
[[Category:Howto]]
 
[[Category:Administration:Monitoring]]
 
[[Category:Administration:Monitoring]]
 
[[Category:Mail]]
 
[[Category:Mail]]

Navigation menu