Changes
From SME Server
Jump to navigation
Jump to search
← Older edit
Newer edit →
Email Statistics
(view source)
Revision as of 16:51, 14 June 2017
861 bytes added
,
16:51, 14 June 2017
m
→Count messages by qpsmtpd disposition
:
extended version with percent
Line 206:
Line 206:
6 check_spamhelo
6 check_spamhelo
6 auth::auth_cvm_unix_local</nowiki>
6 auth::auth_cvm_unix_local</nowiki>
+
+
I extended the above script to show % of each one:
+
<nowiki>
+
if [ -z $DAYS ]; then DAYS=1; fi; \
+
echo -n "Days of logfiles to scan [$DAYS]: "; read NEWDAYS; \
+
if [ $NEWDAYS ]; then DAYS=$NEWDAYS; fi; \
+
awk -F"[\t]" ' /logterse/ { svc=$6; count[svc]++; count["Total"]++; } END \
+
{ for (j in count) print count[j] "\t" j "\t" expr count[j]/count["Total"]*100"%" ; }' \
+
$(find /var/log/qpsmtpd /var/log/sqpsmtpd -ctime -$DAYS -type f) \
+
|sort -n
+
</nowiki>
+
Sample output of extended version:
+
<nowiki>
+
1 headers 0.00769468%
+
2 auth::auth_cvm_unix_local 0.0153894%
+
33 earlytalker 0.253924%
+
355 spamassassin 2.73161%
+
401 naughty 3.08556%
+
698 tls 5.37088%
+
774 rhsbl 5.95568%
+
1127 check_goodrcptto 8.6719%
+
1359 queued 10.4571%
+
8246 resolvable_fromhost 63.4503%
+
12996 Total 100%
+
</nowiki>
===Display messages that would have been blocked via DNSBL===
===Display messages that would have been blocked via DNSBL===
Jader
147
edits
Navigation menu
Page actions
Page
Discussion
View source
History
Page actions
Page
Discussion
More
Tools
In other languages
Personal tools
English
Log in
Koozali SME Server
Main Page
Welcome
Releases
Testimonials
Documentation
SME Server FAQ
Volunteering
Commercial Support
Recent activities
Dashboard
Recent wiki changes
Recent bug changes
Unread Forum posts
Koozali resources
Contribs
How-To's
Forums
Bugzilla
Mailing Lists
Translations
Download
Koozali SME Server wiki
Wiki statistics
Wiki categories
Wiki Help
Koozali Wiki Help
Tools
Special pages
Printable version
Search