From 4ca926004d6d04fc73103180b9ac892abb352b83 Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 27 Jun 2017 15:18:56 +0200 Subject: bin/get_mail_stats: Adding postgrey stats. --- bin/get_mail_stats | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bin') diff --git a/bin/get_mail_stats b/bin/get_mail_stats index 0fcf20d..dedb04c 100755 --- a/bin/get_mail_stats +++ b/bin/get_mail_stats @@ -10,6 +10,7 @@ spampd_clean="" spampd_spam="" sieve_spam="" postfix_sent="" +postgrey_delayed="" function set_range() { @@ -35,6 +36,7 @@ function get_stats() spampd_spam=$(journalctl -S "$time_frame" -u spampd| grep "identified spam"| wc -l) sieve_spam=$(journalctl -S "$time_frame" _EXE=/usr/lib/dovecot/dovecot-lda| grep "Spam"| wc -l) postfix_sent=$(journalctl -S "$time_frame" _EXE=/usr/lib/postfix/bin/smtp |grep "sent"| wc -l) + postgrey_delayed=$(journalctl -S "$time_frame" -u postgrey |grep "reason=new"| wc -l) set -e } @@ -43,6 +45,7 @@ function print_stats() echo "Mail statistics for $(hostname) since $time_frame" echo "Received total: $postfix_received" echo "RBL dropped: $rbl_dropped" + echo "Delayed: $postgrey_delayed" echo "Spampd clean: $spampd_clean" echo "Spampd spam: $spampd_spam" echo "Sieve spam: $spampd_spam" -- cgit v1.2.3-70-g09d2