<<< Date Index >>>     <<< Thread Index >>>

Re: Using a maildir or mh folder for the message cache?



On Tuesday, 08 August 2006 at 14:56, Kyle Wheeler wrote:
> >>The goal is to make it possible to view things semi-conveniently 
> >>offline, not to perfectly replace actually having a network 
> >>connection.
> >
> >Yeah, of course. But you can't view everything; just what you saw 
> >already so this isn't even a "read-only offline cache".
> 
> So? It's better than nothing. I'm not saying advertise it as "NEW! 
> Mutt can read ALL YOUR MAIL offline!", I'm saying make it more 
> convenient to use what we already download. I mean, if we insist that 
> offline use of the full message bodies that we happen to have 
> downloaded can only be done by mutt-geniuses who know the innards of 
> the cache, you might as well just insist on using "cat" for 
> everything. The key word in what I said was "semi-conveniently" not 
> "perfect for all uses, cache of everything". We HAVE these messages 
> stored on disk already, it seems a shame to be unable to use them 
> (with anything other than "cat" or "less" or "more").

I have nothing against including a script like Kyle's somewhere in the
docs behind a suitable disclaimer - I use one like it myself on
occasion. One of the reasons I was so keen on having the cache format
be what it is (not a bunch of opaque MD5s) is so that scripts like
this would be trivial to write.

Rocco's already explained why the cache isn't actually in proper
maildir format. In fact at one point I had attempted to combine
knowledge of flags from the header cache with the UID info so that the
cache files could have proper maildir names, but I stumbled into the
hcache-stores-pointers bug when I updated it on sync.

Another possibility is to maintain a UID->flags index file in the
cache directory - hcache is nicer but it also introduces an extra
dependency.

This code is all supposed to be laying groundwork for proper offline
mode (read-only, then read-write). But I can't give an ETA on that,
I'm afraid.

Attachment: pgpmwPe0aeDFf.pgp
Description: PGP signature