[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Messages marked unread after refile?



At Sat, 16 Oct 2010 10:25:29 -0400,
Ian Daniel Leroux wrote:
> I have my mail stored locally in maildirs, which get sync'd to my
> mailserver using offlineimap. Whenever I refile read messages from one
> folder to another (using 'o', nothing exotic) the moved messages are
> marked as unread, sort of:
> - The next time I update my folder list with 's', the destination
>   folder's counter of unread messages increases by the number of
>   messages transferred to it.
> - offlineimap sees the transferred messages as unread and replicates
>   them as such to the mail server.
> BUT
> - Wanderlust still knows the messages are read, because the moment
>   I open the destination folder in wanderlust all the moved messages
>   immediately get marked as read again.

I partially understand this now.  When elmo moves a read message to a
maildir, it deposits it into the new/ subdirectory of the destination
folder (good and holy) with the S (seen) flag at the end of the
filename.  This seems sensible, but unfortunately offlineimap and
wanderlust (presumably via elmo) assume that any message in the new/
folder must be unread.  In wl's case this only affects the Folder
display, as soon as the folder is opened the refiled message is moved
to cur/ and the count of unseen messages is correctly updated.
offlineimap actually marks the message unread on the remote server
next time it syncs.

What's the proper way to fix this?  Is it permissible in a correct
Maildir implementation to transfer a message directly from tmp/ to
cur/ without going through new/, when the message is not in fact new?
Or is this a bug in clients that assume that messages in new/ are
unread?

Thanks for any insight,

Ian Leroux