From f2f570c87ec3ee9d0155c522a437e516fbb4142d Mon Sep 17 00:00:00 2001 From: Brian Read Date: Tue, 17 Dec 2024 19:40:26 +0100 Subject: [PATCH] Add in uqpsmtpd log directory --- root/usr/bin/runmailstats.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/root/usr/bin/runmailstats.sh b/root/usr/bin/runmailstats.sh index 4b21b90..61f9706 100755 --- a/root/usr/bin/runmailstats.sh +++ b/root/usr/bin/runmailstats.sh @@ -1,14 +1,16 @@ #!/bin/bash #exec 1> >(logger -t $(basename $0)) 2>&1 -perl /usr/bin/mailstats.pl /var/log/qpsmtpd/\@* /var/log/qpsmtpd/current /var/log/sqpsmtpd/\@* /var/log/sqpsmtpd/current +perl /usr/bin/mailstats.pl /var/log/qpsmtpd/\@* /var/log/qpsmtpd/current /var/log/sqpsmtpd/\@* /var/log/sqpsmtpd/current /var/log/uqpsmtpd/\@* /var/log/uqpsmtpd/current # and run new python one - start by copying and decoding log files yesterday_date=$(date -d "yesterday" +'%Y-%m-%d') cd /var/log/qpsmtpd cat \@* current >/opt/mailstats/logs/current1 2>/dev/null cd /var/log/sqpsmtpd cat \@* current >/opt/mailstats/logs/current2 2>/dev/null +cd /var/log/uqpsmtpd +cat \@* current >/opt/mailstats/logs/current3 2>/dev/null cd /opt/mailstats/logs -cat current1 current2 2>/dev/null | /usr/local/bin/tai64nlocal | grep "$yesterday_date" > current.log +cat current1 current2 current3 2>/dev/null | /usr/local/bin/tai64nlocal | grep "$yesterday_date" > current.log ls -l python3 /usr/bin/mailstats.py echo "Done"