Re: [Lurker-users] HowTo delete old mails from archive
Brought to you by:
terpstra
From: Wesley W. T. <we...@te...> - 2010-08-09 18:18:20
|
On Mon, Aug 9, 2010 at 11:42 AM, <lu...@pl...> wrote: > maybe this is a strange question. (to an archiving software) > But is there a (easy :-) ) way to delete,"cleanup" old messages/threads > which > are, lets say, 1 year old? > Unfortunately, not so easily. lurker-search can mark messages as deleted based on a search criteria. lurker-regenerate drops messages marked as deleted during reindexing. This suggest a two-step approach where you tag all the old messages as deleted and then run lurker-regenerate to reclaim the space. The problem is that lurker-search does not support searching based on date. You can readily delete all the emails by a given author or to a particular list, but not based on age. Thus you're stuck with painful approaches like: One solution would be to decompress the mailbox files (gzip -c /lurker-db/mailinglist > /tmp/mailinglist). Then open a text editor and remove all the messages from the start of the file up to a message with an acceptable date (they should be sorted oldest to newest). Repeat for each mailing list. Nuke your database and run lurker-index on your newly trimmed mailboxes. Obviously, this approach is suboptimal. It would be relatively easy to add a date range clause to lurker-search, and I might be convinced to do so. Then you could use this enhanced lurker-search to tag old email and lurker-regenerate to reclaim the space. |