Hi,
I was using (in postfix main.cf)
maillog_file = /var/log/maillog
Logs look like:
Apr 15 17:09:23 mail postfix/master[125626]: daemon started -- version
3.7.10, configuration /etc/postfix
If postfix logging is unchanged from debian conf (no maillog_file=), I
get timestamps like:
2024-04-15T17:08:12.982938+02:00
and the logs appear both in the journal and in /var/log/mail.log
pflogsumm args:
pflogsumm -d yesterday \
-u 20 -h 20 \
--problems_first \
--smtpd_stats \
--ignore_case \
--bounce_detail=0 \
--deferral_detail=0 \
--reject_detail=0 \
--smtpd_warning_detail=0 \
--no_no_msg_size \
--iso_date_time \
--verp_mung=2 \
/var/log/maillog
/magnus
On 2024-04-12 15:03, Sven Hoexter wrote:
On Fri, Apr 05, 2024 at 01:01:52AM +0200, Magnus Stenman wrote:
Hi,
sorry for the delay, I just started to briefly look into the issue.
Pflogsumm reports zero mails on day 1-9 of every month
Stock debian postfix version
Patch:
--- /usr/sbin/pflogsumm.orig2024-04-05 00:45:38.214914066 +0200
+++ /usr/sbin/pflogsumm 2024-04-05 00:45:44.710952673 +0200
@@ -1518,7 +1518,7 @@
}
my ($t_mday, $t_mon, $t_year) = (localtime($time))[3,4,5];
-return sprintf("%s %2d", $monthNames[$t_mon], $t_mday),
sprintf("%04d-%02d-%02d", $t_year+1900, $t_mon+1, $t_mday);
+return sprintf("%s %02d", $monthNames[$t_mon], $t_mday),
sprintf("%04d-%02d-%02d", $t_year+1900, $t_mon+1, $t_mday);
}
It's been a while I looked into pflogsumm and for me it still works,
but I do not rely for a long time on the traditional BSD syslog format.
Also Debian doesn't do that by default for some time, so I'm wondering
what exactly your logs look like. If possible please provide a sample.
Also how did you invoke pflogsumm, any flags in use?
According to RFC3164 section 4.1.2 there isn't zero padding but space
padding in the traditional timestamp. Likely there is a bug
somewhere, maybe even in one of the other patches I carry in the
package, but I believe the format returned here, without zero
padding on the day of the month is correct.
Sven