On Tue, 23 Mar 2010, Ruben Pollan wrote: > On 16:39, Thu 18 Mar 10, Michal Sojka wrote: > > This mailstore allows bi-directional synchronization between maildir > > flags and certain tags. The flag-to-tag mapping is defined by flag2tag > > array. > > I'm trying it, the synchronization from my maildir to notmuch seems to work fine > except for the "unread" tag, it is never set. I use normally my maildir with > mutt, so the unread messages are on mail_folder/new. Could that be the problem? > is it a bug or something I do wrong? Yes, that's a bug. Messages in your mail_folder/new probably don't have any 'info' (flags) in their filename, which is correct with respect to http://cr.yp.to/proto/maildir.html. My patch incorrectly ignores the files without 'info'. I didn't catch this error because is seems that offlineimap puts 'info' part even to messages in new/. I think that the correct fix for this is to change how notmuch new works: Whenever a message in new/ is found, it will be moved to cur/ and in there is no info part it will be appended and the message will be tagged accordingly. I'll try to implement it and send a new patch. -Michal