SYNOPSYS

This is how I file my old mails, and what I use to search in.

PROCEDURE

First I archive the mail of the previous year.

1
2
3
4
5
Y=$(date +%Y)
PY=$(($Y - 1))
for I in maildirs; do
    archivemail -D $Y-01-01 --preserve-unread --no-compress --suffix=-$PY -o ~/mail_path/archives/ ~/mail_path/$I
done

Then I can index them using mairix

~/.mairixrc

1
2
3
4
5
base=~/mail_path/archives
maildir=*
mbox=*
mfolder=~/mail_path/search
database=~/mail_path/.mairix_database

I hav the following in my muttrc to search the archives using mairix.

~/.muttrc

1
macro index \eb 'c=search'<enter><shell-escape>'mairix ' 'Enter Mairix search term'