is there a mailman command/setting to periodically clean archives?
Thanks to everyone's help, mailman3 is up and running for me on two servers with three lists, and they all work as far as I can see. I'm sending out invitations to users tomorrow. Yayy. Up until today, I had been stuck using a plugin in Joomla, which was not the best solution. I'm tickled pink, and my users will be, too.
Now I'm just playing and tinkering a bit.
I'd like to delete all my archives that are more than a certain age, e.g. more than a week old. I can easily do that with a cron job, deleting old files in
/opt/mailman/mm/var/archives/prototype/testlist@example.com/*
which is, as far as I can see the only place archive emails live.
However... I was wondering if there was some mailman command or config variable that would accomplish this without using cron.
billo
On 12/29/21 3:58 PM, William Oliver wrote:
I'd like to delete all my archives that are more than a certain age, e.g. more than a week old. I can easily do that with a cron job, deleting old files in
/opt/mailman/mm/var/archives/prototype/testlist@example.com/*
which is, as far as I can see the only place archive emails live.
Those are emails archived in the prototype archiver. That's all the prototype archiver does - store the mail there. The HyperKitty archived emails are stored in the mailmanweb database in the hyperkitty_email table. Attachments are in the hyperkitty_attachment table and other tables are also involved.
However... I was wondering if there was some mailman command or config variable that would accomplish this without using cron.
The cron will work for the prototype archives, but it's probably easier to just disable the prototype archiver. For HyperKitty, see the thread at https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/J...
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Wed, 2021-12-29 at 16:11 -0800, Mark Sapiro wrote:
The cron will work for the prototype archives, but it's probably easier to just disable the prototype archiver. For HyperKitty, see the thread at https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/J...
Cool. Thanks for the script. I'll give it a shot once I accumulate some archives.
billo
On 12/29/21 4:11 PM, Mark Sapiro wrote:
On 12/29/21 3:58 PM, William Oliver wrote:
I'd like to delete all my archives that are more than a certain age, e.g. more than a week old. I can easily do that with a cron job, deleting old files in
/opt/mailman/mm/var/archives/prototype/testlist@example.com/*
which is, as far as I can see the only place archive emails live.
Those are emails archived in the prototype archiver. That's all the prototype archiver does - store the mail there. The HyperKitty archived emails are stored in the mailmanweb database in the hyperkitty_email table. Attachments are in the hyperkitty_attachment table and other tables are also involved.
As a followup: Is there any need or advantage to running both the prototype and hyperkitty archivers?
I did an installation following the venv directions, and it looks as though the system now uses both archivers.
If this is a duplication of effort and storage, is it safe to disable the prototype archiver like this:
# /etc/mailman3/mailman.cfg .. [archiver.prototype] enable: no
and then delete anything under here?
/opt/mailman/mm/var/archives/prototype/
Thanks
dn
On 1/4/22 2:59 PM, David Newman wrote:
As a followup: Is there any need or advantage to running both the prototype and hyperkitty archivers?
Only if you want to keep all the raw messages. HyperKitty only stores the message_id, subject, date, in_reply_to and sender information. Other header information is not stored in HyperKitty. The prototype archiver is intended to store messages to be delivered to some other third party archiver.
I did an installation following the venv directions, and it looks as though the system now uses both archivers.
If this is a duplication of effort and storage, is it safe to disable the prototype archiver like this:
# /etc/mailman3/mailman.cfg .. [archiver.prototype] enable: no
and then delete anything under here?
/opt/mailman/mm/var/archives/prototype/
Yes, but you also have to go through all the lists Settings -> Archiving pages and uncheck prototype under Active archivers. You could also do this with a database query like
UPDATE listarchiver SET _is_enabled = 'f' WHERE name = 'prototype';
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
David Newman
-
Mark Sapiro
-
William Oliver