EOT - Expire Old Threads
Copyright (c) 2003, 2005 Gunnar Wolf - firstname.lastname@example.org
I started using mutt as my mail reader a couple of months ago. One of the features I most liked about mutt is that the messages are by default sorted by thread - this really helps following a long conversation in a very active mailing list!
In order to have the threading as complete as possible, I started archiving all my old messages - of course, as mutt users do, I now save each mailing list to a different folder. Life was great.
Life was not perfect, though. After a couple of weeks, some of my mailing lists had too much traffic, and -at over 2000 archived messages- mutt took some time to open them. I am currently using mbox-formatted mailboxes - switching to maildir might have solved the problem for a couple of weeks, but it would happen again. I did not want to artificially cut my mailbox at a specific date, as I would lose all the benefits of my beloved threads.
I came across the fine and overwhelmingly complete Mail::Box Perl module, and I found how easy would it be to move old threads to a different mailbox, instead of moving individual messages.
Usage is quite straightforward - first of all, as usual:
will give you a list of EOT’s options, all of which are optional (but usually you will want to specify at least -f and -F).
The valid options are:
eot -f <from_mailbox> -t <from_type> -F <to_mailbox> -T <to_type> -p <period>
All arguments are optional.
opt description default
-f Which source mailbox to use mailbox
-t What format is this mailbox in (mbox, maildir, mh) mbox
-F Which destination mailbox to use mailbox.arch
-T What format is this mailbox in (mbox, maildir, mh) mbox
-p Period of time to declare a thread as old, in days 7
-v Whether to report work statistics to STDOUT 0
-f and -F refer to a mailbox - either to a file (if it is a mbox mailbox) or to a directory (if it is a maildir or MH mailbox) in the local directory, or the full (or relative) path to the mailbox in question.
-t and -T refer to the kind of mailbox to open - mbox, maildir or mh.
-p indicates how old (in days) should the last message in a thread be for the whole thread to be considered inactive.
If -v is not specified, EOT will run quietly. If -v is specified, a short summary will be reported after running.
EOT is licensed under the GNU GPL version 2 or higher, at your option. The full text of the GNU GPL can be found here.
EOT is written in Perl, and therefore requires Perl (version 5 or higher) to be installed. Additionally, EOT requires the following Perl
Mail::Box (tested with 2.038)
Date::Parse - part of TimeDate (tested with 1.1400)
You can find them at the CPAN. If you use a Debian system, they are resepctively in the libmail-box-perl and libtimedate-perl packages.
EOT was created by Gunnar Wolf (email@example.com) in May 2003. You can use it freely for whatever you want as long as you abide by the GNU GPL license.
Ok, so I got you interested? ;-) </p>
You can download version 1.1 of EOT here.
eot-1.1.tar_.gz (4 KB)