> On 13Apr2012 22:18, seanh <snh...@gmail.com> wrote: > | I wonder if it's possible to write a script that would get mutt to open > | every folder in an imap account and download all of the message bodies > | and headers into its cache? You could run it from cron to keep your mutt > | working reasonably fast. > > Does a first cut of (untested): > > for f in INBOX this that theother > do mutt -e 'push <quit>' -f "imaps://my-imap-server/$f" > done > > get you off the ground?
Yes! That worked very well. This is what I ended up with, it fills both the header and message caches: #!/bin/sh for f in INBOX Archives/2011 Archives/2012 \[Google\ Mail\]/Sent\ Mail do mutt -e 'push <limit>~b\ foobar<enter><quit>' -f "imaps://snh...@imap.gmail.com:993/$f" done My message cache is 1GB now :) And opening and searching folders seems pretty fast. I have to manage the hardcoded list of accounts and folders manually, but that's not so bad. It'd be cool to package this up into a configurable script though. It sounds like I should also set the message_cache_clean variable when the script runs: http://www.mutt.org/doc/devel/manual.html#maint-cache