#990336 mailman3: Improve logrotate configuration

#990336#5
Date:
2021-06-26 01:50:34 UTC
From:
To:
Dear maintainer,

The Mailman3 package currently includes logrotate configuration for one file,
/var/log/mailman3/mailman.log. However, it is pretty common to enable other
logs, changing it to apply to /var/log/mailman3/*.log would be much nicer
IMO and what most sysadmins expect. I have tested this on Wikimedia's
Mailman3 install and it works properly.

I'm also somewhat curious why it only keeps 5 days worth of logs by default,
personally I think something like 7 days or 14 (what apache2 uses) would
be more reasonable.

Thanks,
-- Kunal

#990336#10
Date:
2022-07-28 11:59:18 UTC
From:
To:
  I've just noticed this myself.  Our smtp.log is from 2020-08-08
onwards, so almost 2 years worth of logging.  It's 28 MiB in size, so
not disasterously big.

  I've added specific rotation of the other logfiles manually for now.

#990336#15
Date:
2023-06-07 13:32:00 UTC
From:
To:
Hi

Le Thu, Jul 28, 2022 at 12:59:18PM +0100, Athanasius a écrit :

Would you mind sharing the snippet that you used for the logrotate config ?

It seems that maybe the smtp.log file might need special treatment, if I refer to the discussion at https://gitlab.com/mailman/mailman/-/issues/931 (following https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/RRFWGZY56OHAXPRCIQD5RLU3SLW5W2LH/ )

Hope this helps,

Best regards,

#990336#20
Date:
2023-06-07 15:38:46 UTC
From:
To:
---------------------------------------------------------------------------
/var/log/mailman3/bounce.log /var/log/mailman3/debug.log /var/log/mailman3/plugins.log /var/log/mailman3/smtp.log /var/log/mailman3/mailman.log {
        daily
        rotate 5
        compress
        delaycompress
        missingok
        notifempty
        create 640 list list
        postrotate
                if /etc/init.d/mailman3 status >/dev/null; then \
                    /usr/bin/mailman-wrapper reopen >/dev/null; \
                fi;
        endscript
}
---------------------------------------------------------------------------

Which has currently resulted in:
---------------------------------------------------------------------------
root@river:/var/log/mailman3;
16:31:17 0$ ls -lart
total 352
-rw-r-----  1 list list      0 Aug  8  2020 plugins.log
-rw-r-----  1 list list      0 Aug  8  2020 debug.log
-rw-r-----  1 list list    184 May 16 16:41 bounce.log.5.gz
-rw-r-----  1 list list    877 May 18 05:02 bounce.log.4.gz
-rw-r-----  1 list list    278 May 19 22:07 bounce.log.3.gz
-rw-r-----  1 list list    133 May 20 09:23 bounce.log.2.gz
-rw-r-----  1 list list    356 May 23 20:48 bounce.log.1
-rw-r-----  1 list list      0 May 24 06:25 bounce.log
-rw-r-----  1 list list   1238 Jun  3 05:30 smtp.log.5.gz
-rw-r-----  1 list list  18977 Jun  3 06:25 mailman.log.5.gz
-rw-r-----  1 list list    997 Jun  4 04:30 smtp.log.4.gz
-rw-r-----  1 list list  18824 Jun  4 06:25 mailman.log.4.gz
drwxr-xr-x 36 root root  16384 Jun  5 02:33 ../
-rw-r-----  1 list list   1019 Jun  5 06:25 smtp.log.3.gz
-rw-r-----  1 list list  18743 Jun  5 06:25 mailman.log.3.gz
-rw-r-----  1 list list    781 Jun  6 06:25 smtp.log.2.gz
-rw-r-----  1 list list  18652 Jun  6 06:25 mailman.log.2.gz
-rw-r-----  1 list list   4336 Jun  7 06:00 smtp.log.1
-rw-r-----  1 list list 196373 Jun  7 06:25 mailman.log.1
drwxr-xr-x  2 list list   4096 Jun  7 06:25 ./
-rw-r-----  1 list list   2009 Jun  7 15:12 smtp.log
-rw-r-----  1 list list   7738 Jun  7 16:00 mailman.log
---------------------------------------------------------------------------

The current last line in smtp.log.1 is timestamped `Jun 07 06:00:10 2023`,
so it doesn't *look* like the upstream bug/fix you linked to affects this
setup.

  But thanks for the heads up.  That fix being from only 4 days ago no
doubt means it won't be in bookworm's packages, at least not at
promotion to stable this weekend.  Hopefully it will be backported in
ASAP.

#990336#23
Date:
2026-08-06 08:25:19 UTC
From:
To:
Hello,

Bug #990336 in mailman3 reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/mailman-team/mailman3/-/commit/62c4ca7933157ce92b684ae2f7c858eef7bbf36f
------------------------------------------------------------------------
logrotate: use systemctl, handle all log files and keep 14 days.

Closes: #990336
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/990336

#990336#30
Date:
2026-08-07 07:49:13 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
mailman3, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 990336@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jordi Mallach <jordi@debian.org> (supplier of updated mailman3 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 07 Aug 2026 09:06:47 +0200
Source: mailman3
Architecture: source
Version: 3.3.10-5
Distribution: unstable
Urgency: medium
Maintainer: Debian Mailman Team <pkg-mailman-hackers@lists.alioth.debian.org>
Changed-By: Jordi Mallach <jordi@debian.org>
Closes: 990336 1051957 1055449 1135067
Changes:
 mailman3 (3.3.10-5) unstable; urgency=medium
 .
   * Add upstream patch to fix correct rotation of log files.
   * logrotate: use systemctl, handle all log files and keep 14 days
     (closes: #990336).
   * Add postgresql to After and Wants in systemd service file (closes: #1055449).
   * Poll for the REST API instead of a fixed sleep to fix flaky autopkgtest
     (closes: #1051957).
   * Don't allow autopkgtest failures on riscv64 anymore.
   * Avoid output to stderr during failed connection attempts in the curl loop.
   * Use publicsuffix data from the Debian package (closes: #1135067).
   * Mark upstream patches as Forwarded: not-needed
Checksums-Sha1:
 6fc1fb259dc269572d903883bbaab74ba4827d6f 3123 mailman3_3.3.10-5.dsc
 704131f1c8cb2361f7316c75a3ca628fdc5177a0 33860 mailman3_3.3.10-5.debian.tar.xz
 60a58c4442a1c3a5dbaa1e3a5d266395860cab9f 11089 mailman3_3.3.10-5_amd64.buildinfo
Checksums-Sha256:
 f5a054c5fa966e83d64784491d83aec3657e984d6ff6aa6f35803a3f23d4c33a 3123 mailman3_3.3.10-5.dsc
 85ea14adacf66839a43ab0d51e19b8d6d50ef59118221f445eff27a5f04b5a08 33860 mailman3_3.3.10-5.debian.tar.xz
 f3ab436b7467960d3de637513b14586ddbd2372ecff509d412911d365c222edd 11089 mailman3_3.3.10-5_amd64.buildinfo
Files:
 433ce0ac409c775300da40fb5016dfa4 3123 mail optional mailman3_3.3.10-5.dsc
 69948c2d465b41a1bc3278736d5c359d 33860 mail optional mailman3_3.3.10-5.debian.tar.xz
 0c82b1f36fc6020fe4dee2814538e7a3 11089 mail optional mailman3_3.3.10-5_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE6BdUhsApKYN8KGoWJVAvb8vjywQFAmp1h6oACgkQJVAvb8vj
ywSWixAAqcViHSdgwVSVz14YOos8RHk530ishQsj6XqdW8VYaW0fRkEfq6WqSN56
wAq6ED03Pw3A7XgIdmHBLO3wId1vONB+PeOLLCp5KmrIpH1uqMl6vhOtA5ryMGxj
Pen1YNy53Deq1Fc/jNo81DXGX5oJ7Y0FueO5tRvAVO1hX6RN7hC0oD8k9xgu12ok
G5gy5j1hzrZAqJwRPZ0ISo0TKS092iv/F5aDHInaATm8Bn0VJgJC5hCo9Ct21CcD
Mf3+r5lC3yoCIovnHkiQ2qYn88nqMZpVq7OzQXetPa93wCoL51as8dbGspHu+F1Z
XiyV42YSrneWsL6EIyJSJM9Ysn7iI8lBJNC2Sv2jC8TslBoJ9fLaioheNJgQvuui
gu6c+0g6qMPjvY+7Fq0PkPBGhCHlSbjK2AV15583yUss1iqnyQK48sPRaMIBXg7q
oGP9c0X2QvMg9FI1UKYG1x0W05WUTjyHU6BzNt3RYrmmPFzafsoGHEQ16wB/Y3Q3
1oTlhEjeOd/Qd8IychmKS6ZNtNxudSAk5iEqzoJw9NnXXAJHzX99z99kTOifbPeU
D2mttuJxqqv7wDrJ5UvrpqynWeDV8OExTVtmumZgZSFYEONFOYsvaa9v8vYbEf8i
zmdYKLZqYrSxn08wH/JjlFzkEZz1JxwiwT/sqBLYXJEPRwg06lY=
=6F7d
-----END PGP SIGNATURE-----