From c8ef5b927dbb7a55ca4b331c043a7d287769ebbc Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rofes <3604235+piwai@users.noreply.github.com> Date: Sat, 18 Jul 2026 21:24:41 +0200 Subject: [PATCH] fix(pflogsumm): simplify and process necessary files only (#4722) --- CHANGELOG.md | 2 +- target/bin/report-pflogsumm-yesterday | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9360eef4..5b5c59ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ All notable changes to this project will be documented in this file. The format - **Tests:** - Make the helper method `_get_container_ip()` compatible with Docker 29 ([#4606](https://github.com/docker-mailserver/docker-mailserver/pull/4606)) - **Pflogsumm:** - - Fix wrong daily reporting when mail log retention is greater than one year ([#4709](https://github.com/docker-mailserver/docker-mailserver/pull/4709)) + - Fix wrong daily reporting when mail log retention is greater than one year ([#4709](https://github.com/docker-mailserver/docker-mailserver/pull/4709), [#4722](https://github.com/docker-mailserver/docker-mailserver/pull/4722)) ### Removed diff --git a/target/bin/report-pflogsumm-yesterday b/target/bin/report-pflogsumm-yesterday index 56b9351f..685208eb 100755 --- a/target/bin/report-pflogsumm-yesterday +++ b/target/bin/report-pflogsumm-yesterday @@ -13,8 +13,9 @@ SENDER=${3} [[ -x /usr/sbin/pflogsumm ]] || _exit_with_error "'/usr/sbin/pflogsumm' not found or executable" -# shellcheck disable=SC2046 -BODY=$(gzip -cdfq $(find /var/log/mail -type f -name 'mail.log*' -mtime -180 | sort -rV) | /usr/sbin/pflogsumm --problems_first -d yesterday) +# `pflogsumm` expects files in chronological order, while for `-d yesterday` +# the only relevant log files to process are `mail.log.1` (oldest) and `mail.log`: +BODY=$(/usr/sbin/pflogsumm --problems_first -d yesterday /var/log/mail/mail.log{.1,}) sendmail -t <