Auto discard after max_days_to_hold not working.

Dear all,
I have migrated around 300 mailing lists from Mailman 2 to Mailman 3. In most of the mailing lists we have configured "max_days_to_hold" to 2. It was working fine in Mailman 2. However, it is not working in Mailman 3.
Mailman version: GNU Mailman 3.3.10 (Tom Sawyer) Python 3.11.9 Rocky Linux 9.5
Crontab: @daily /opt/mailman/venv/bin/mailman digests --periodic 00 08 * * * /opt/mailman/venv/bin/mailman notify
0,15,30,45 * * * * /opt/mailman/venv/bin/mailman-web runjobs quarter_hourly @hourly /opt/mailman/venv/bin/mailman-web runjobs hourly @daily /opt/mailman/venv/bin/mailman-web runjobs daily @weekly /opt/mailman/venv/bin/mailman-web runjobs weekly @monthly /opt/mailman/venv/bin/mailman-web runjobs monthly @yearly /opt/mailman/venv/bin/mailman-web runjobs yearly/opt/mailman/venv/bin/mailman-web runjobs minutely
Please guide me in this regard.
Regards, Hitachi.

Hitashi mancho via Mailman-users writes:
I have migrated around 300 mailing lists from Mailman 2 to Mailman 3. In most of the mailing lists we have configured "max_days_to_hold" to 2. It was working fine in Mailman 2. However, it is not working in Mailman 3.
This doesn't seem to be exposed in Postorius. It's not all that old in Mailman 3 (April 2020) so it's possible that it is not moved from Mailman 2 to Mailman 3 by the migration scripts.
You can use "mailman withlist" to access that variable: Use "mailman withlist -l LIST@DOMAIN.TLD", then at the prompt:
m.max_days_to_hold
to examine the value for LIST@DOMAIN.TLD.
To do a mass change, something like
for ml in mailman lists
; do
mailman withlist -l $ml -r fix_mdth
done
where you put in Mailman's bin directory the file 'fix_mdth.py' containing
def fix_mdth(ml): ml.max_days_to_hold = 2 commit()
Of course if there are list where you want a longer or indefinite hold you'll need to change those back, since this approach changes all of them.
You can get more information with "mailman withlist --detail".
-- GNU Mailman consultant (installation, migration, customization) Sirus Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

On 4/28/25 07:59, Stephen J. Turnbull wrote:
This doesn't seem to be exposed in Postorius. It's not all that old in Mailman 3 (April 2020) so it's possible that it is not moved from Mailman 2 to Mailman 3 by the migration scripts.
This is comments in postorius/forms/list_forms.py
# TODO: Expose after this functionality actually works in Core.
# max_days_to_hold = forms.IntegerField(
# min_value=0,
# label=_('Discard held posts after'),
# required=False,
# help_text=_(
# 'No. of days after which held messages will be automatically'
# ' discarded.'))
mailman import21
will import the setting, but per the above comment,
it doesn't yet work. The setting exists and is exposed in REST, but it
appears it is not actually implemented.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 4/28/25 10:55, Mark Sapiro wrote:
mailman import21
will import the setting, but per the above comment, it doesn't yet work. The setting exists and is exposed in REST, but it appears it is not actually implemented.
This is now implemented for the next release. See https://gitlab.com/mailman/mailman/-/issues/1215 and https://gitlab.com/mailman/mailman/-/merge_requests/1346 for Mailman core and https://gitlab.com/mailman/postorius/-/issues/628 and https://gitlab.com/mailman/postorius/-/merge_requests/1001 for Postorius.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thank you so much, Mark and Stephen, for the quick action and response. Waiting for the next release.
On Tue, Apr 29, 2025 at 10:52 AM Mark Sapiro <mark@msapiro.net> wrote:
On 4/28/25 10:55, Mark Sapiro wrote:
mailman import21
will import the setting, but per the above comment, it doesn't yet work. The setting exists and is exposed in REST, but it appears it is not actually implemented.This is now implemented for the next release. See https://gitlab.com/mailman/mailman/-/issues/1215 and https://gitlab.com/mailman/mailman/-/merge_requests/1346 for Mailman core and https://gitlab.com/mailman/postorius/-/issues/628 and https://gitlab.com/mailman/postorius/-/merge_requests/1001 for Postorius.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
This message sent to huhamails@gmail.com
participants (3)
-
Hitashi mancho
-
Mark Sapiro
-
Stephen J. Turnbull