On Tue, Oct 18, 2016 at 02:09:39PM +0200, Antoine Levitt wrote:
> When I compose a draft in gmail, mbsync syncs it just fine, but there's
> no "D" flag at the end of the file name, and mu4e refuses to edit
> it. Could mbsync add an option to specify a mailbox as a "draft"
> mailbox, and add the suffix automatically?
that approach sounds wrong to me: mbsync is supposed to sync the
messages verbatim. think about the implications: what should happen if a
D message is found in another folder on the client? there is some
inherent asymmetry involved here.
the cleaner approach would be getting gmail to do the flagging
server-side. isn't this possible?

> Separate but related issue: when I create drafts in mu4e, I get draft
> files that look like
> 1476790027.b70383ace79cff96.epsilon:2,DS
> When mbsync handles them, it renames them to something like
> 1476790027.b70383ace79cff96.epsilon,U=53:2,DS
> and mu4e gets confused: if I keep editing my draft, it agains creates a
> file without U=, which mbsync syncs with an increasing U= value, and
> then I'm left with tons of drafts. Based on what you said about messages
> being immutable, what's the proper behavior there? Should mu4e delete
> all drafts that share the same prefix but have different U= values?
one can get around the renaming by using mbsync's AltMap mode. that
would prevent that mu4e loses track of previous draft versions. but that
tracking is, indeed, necessary only to delete them.

an implementation which would strip out the ,U=xxx infix to find the
file again (pretty much the same way as it already must do with flags)
would be possible. as the mu4e maintainer i wouldn't be too thrilled
about it, as this is a non-standard format (though it's used somewhat

in either case, each new draft version should have a different basename.

Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
isync-devel mailing list

Reply via email to