On 12/22/20 6:48 AM, Stephen J. Turnbull wrote:
> Ralf Hildebrandt writes:
> 
>  > Today I issued "prune_arch -l flohmarkt -d 30" and wondered about
>  > the immense size of the corresponding archive directory
>  > archives/private/flohmarkt
> 
>  > Shouldn't prune_arch also clean out the "attachments" directory?
>  > (mailman-2.1.34)
> 
> Probably, but that's up to Mark (and I'm pretty sure that's one of his
> personally-maintained scripts rather than one distributed by Mailman).


This is tricky. Prune_arch without the -n/--nobuild option will rebuild
the archive from the pruned mbox file with `bin/arch --wipe`. The issue
is that in the case where the list's scrub_nondigest setting is Yes,
`bin/arch --wipe` preserves the old attachments/ directory because it
contains scrubbed attachments which are not in the mbox file. I.e., the
mbox messages have only links to the attachments in the attachments/
directory.

The attachments directory contains subdirectories of the form yyyymmdd
so it would be possible for prune_arch to determine which ones should
also be pruned. I can look into adding that, although it probably should
be optional because in the case where prune_arch is doing  -b/--backup
or -p/--preserve, the only place where the scrubbed attachments exist is
in those attachments/ directories and removing those directories will
result in possibly unintended loss of information. I.e., the backed up
or pruned mbox will contain links to attachments which will be broken if
the attachments are removed.

My current thinking is if the list's scrub_nondigest setting is Yes,
remove the "pruned" attachments and if either -b/--backup or
-p/--preserve is specified, backup/preserve them too.

Other thoughts are welcome.

-- 
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
    https://mail.python.org/archives/list/mailman-users@python.org/

Reply via email to