Automatic discovery of mailboxes (was Re: procmail failed to sort messages)
On Wed, Jul 27, 2005 at 12:06:42AM -0600, Bob Proulx wrote:
> To bring this back on-topic I configure mutt to dynamically set the
> mailboxes based upon what exists in the directory.
>
> mailboxes `echo $HOME/Mail/Lists/debian/*`
For some reason, I couldn't get this to work (OpenBSD3.7/mutt-1.5.9 from ports)
on my mutt/Maildir install. The Maildir example on the wiki also didn't really
work (especially using boxes nested within folders). So I wrote this, which does
seem to work:
mailboxes ! `\
find ~/Maildir -type d | \
egrep -v 'cur$|tmp$|new$|Maildir$|Hack$|Work$|Personal$' | \
sed 's/.*\/Maildir\///' | \
xargs -I % echo -n ' =%'`
I have a similar mailfilter (although I use getmail). Such fun.
--
Will Maier