On 7/26/24 10:41, Bryan Fields wrote:
On 7/26/24 1:30 PM, Bryan Fields wrote:
mailman=> \c mailmanweb You are now connected to database "mailmanweb" as user "mailman". mailmanweb=> SELECT * FROM hyperkitty_thread WHERE EXTRACT(year FROM date_active) < 1000; id | thread_id | date_active | category_id | mailinglist_id | starting_email_id -------+----------------------------------+------------------------+-------------+----------------+------------------- 35670 | GHLCKUC7TDEBAI27SKRQN5PWX3TGB26Q | 0102-04-15 20:06:12+00 | | 3 | 150555 (1 row)
mailmanweb=> SELECT id FROM hyperkitty_email WHERE EXTRACT(year FROM date) < 1000; id
136872 150555 (2 rows)
Does this mean it imported archives with an invalid date somehow?
Yes, I suspect this bad date is part of the issue.
I would do a few things. First,
SELECT message_id FROM hyperkitty_email WHERE thread_id = 35670;
If this returns just the one message_id, I would then
DELETE FROM hyperkitty_thread WHERE id = 35670; DELETE FROM hyperkitty_email WHERE id = 150555;
and see if that fixes the internal server error when accessing the archive. I would also
SELECT * FROM hyperkitty_email WHERE id = 136872;
and maybe update the date
in that entry.
After deleting that one message and thread, you can make a mbox with
just the one message with the date corrected and run hyperkitty_import
with --since 2000-01-01
and that mbox as input to add the message back
to the archive.
Also, FYI, assuming those messages with very old Date: headers had reasonable unix from dates, the hyperkitty/contrib/cleanarch3 script would fix them, except you have to get the script from https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/contrib/clean... or https://www.msapiro.net/scripts/cleanarch3 because the script in the latest release has a bug.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan