Hyperkitty: Determine the size of an archive
Hi,
we’d like to inform our list owners of archive enabled lists about the (approximate) size of their archive. In Mailman 2 we used the size of the mbox file. Now how can I determine the size of the archived e-mails of a list in Mailman3 with Hyperkitty?
Any ideas?
Thanks, Frank
-- Frank Richter, Chemnitz University of Technology, Germany
Frank Richter writes:
we’d like to inform our list owners of archive enabled lists about the (approximate) size of their archive.
I don't think there's a cheap way to do it. "Their archive" doesn't exist in HyperKitty. There's a single archive for the whole instance, and the list's presentation is created by filtering on the list-id attribute of the messages.
I think you'd need to use SQL to iterate over the hyperkitty_email table taking the length of the content field, and the hyperkitty_attachment table taking the size field, and adding those up by list.
Once you've done that, you could add code to the to_archive handler, or (possibly better from a maintainability standpoint) a new archive_stats handler. Before you do either of those, come back to us because we might be interested in adding such a feature (I have no opinion at this point), which would save you on future maintenance.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
participants (2)
-
Frank Richter -
Stephen J. Turnbull