Skip to content

Suggestions for the use of notmuchfs with dovecot (IMAP) #3

@maertsen

Description

@maertsen

Hi Tim,

Thanks for writing notmuchfs! I've been trying to use it as fallback for imap clients in combination with my main use of mutt-kz/alot. In ISSUES you state the question "An IMAP or POP server could run on top of notmuchfs easily. What would make this more useful?".

I've run into some things which could be improved, in particular for the combination notmuchfs + dovecot. Allthough I lack the C skills to contribute code in the short term, I wanted to share my thoughts with you.

usability

  • do something sensible with the dovecot control and index files. Currently, I instruct dovecot to put those outside the Maildir / in memory, e.g.
mail_location = maildir:~/Maildir:INDEX=MEMORY:CONTROL=/var/dovecot/%u

but it would be more sensible to allow passthrough for both. I don't fully understand why this doesn't work in the first place, but I guess it has something to do with dovecot trying to obtain locks, which triggers unsupported errors in FUSE.
Documentation for these dovecot features can be found at: http://wiki2.dovecot.org/MailLocation

  • perpetuate the size lie to the Maildir S= flag in the filename of individual mail messages, which dovecot indexes. Currently this triggers errors in dovecot, causing it to assume its index is corrupt:
Feb 25 16:14:46 hostname dovecot: imap(user): Error: Cached message size smaller than expected (6209 < 7233)
Feb 25 16:14:50 hostname dovecot: imap(user): Error: Corrupted index cache file (in-memory index).cache: Broken physical size for mail UID 50707
Feb 25 16:14:50 hostname dovecot: imap(user): Error: read(/home/user/Maildir/.spam/cur/#home#user#Maildir.real#.6-in-black#cur#1333623703.M275836P2052.hostname,S=6209:2,S) failed: Input/output error (FETCH for mailbox spam UID 50707)

See also: http://wiki2.dovecot.org/MailboxFormat/Maildir

improvements

  1. allow the creation of tags, e.g. by moving messages to some special. Sample use-case: moving a message from inbox (such as illustrated in your example) to a folder with tag:needsreply, which in turn would add that tag.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions