diff options
author | David Runge <dave@sleepmap.de> | 2017-06-27 15:18:56 +0200 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2017-06-27 15:18:56 +0200 |
commit | 4ca926004d6d04fc73103180b9ac892abb352b83 (patch) | |
tree | 79860b006de0206568b1878fc3042cf8adadda41 | |
parent | 76a00bd86fea1b8ca25371246da8e32e00f8738b (diff) | |
download | dotfiles-4ca926004d6d04fc73103180b9ac892abb352b83.tar.gz dotfiles-4ca926004d6d04fc73103180b9ac892abb352b83.tar.bz2 dotfiles-4ca926004d6d04fc73103180b9ac892abb352b83.tar.xz dotfiles-4ca926004d6d04fc73103180b9ac892abb352b83.zip |
bin/get_mail_stats: Adding postgrey stats.
-rwxr-xr-x | bin/get_mail_stats | 3 |
1 files changed, 3 insertions, 0 deletions
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" |