Hey, i'm a sysadmin. I automate things!
What started as a procmail kinky-list-filter-thingy, is now the Exim filter kinky-list-filter-thingy:
# Exim filter
# kinky-list-filter-thingy
if $h_X-Mailing-List: matches "<?([^@>]+)" or
$h_List-Id: matches "<([^\.]+)" or
$h_X-List-Id: matches "<([^\.]+)"
then
save Maildir/.lists.${perl{sanatize}{$1}}/
finish
endif
You see the sneaky '${perl{sanatize}{$1}}' Exim expansion? That is because I don't trust any of you, nor do I trust your headers, so I filter out anything that doesn't belong there. See the Exim documentation on how I did that Perl-in-Exim-trick.
Next I use three lines and two scripts in my .muttrc to automatically include the available mailboxes on my system:
`echo subscribe $(~/.tools/lists)` `echo lists $(~/.tools/lists)` mailboxes `~/.tools/mailboxes`Works like a charm! Now you might also want to see my folderhooks trick!