fix(pflogsumm): simplify and process necessary files only (#4722)

This commit is contained in:
Pierre-Yves Rofes authored and GitHub committed 2026-07-18 19:24:41 +00:00
1 parent e8be73105c
commit c8ef5b927d
2 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -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
+3 -2
View File
@@ -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 <<EOF
From: ${SENDER}