Re: best practices for keeping a notmuch tag in sync with maildir folder

Subject: Re: best practices for keeping a notmuch tag in sync with maildir folder

Date: Mon, 5 Sep 2022 13:44:48 +0200

To: David Bremner

Cc: Bence Ferdinandy, notmuch@notmuchmail.org

From: Michael J Gruber


Am Mo., 5. Sept. 2022 um 13:33 Uhr schrieb David Bremner <david@tethera.net>:
>
> Bence Ferdinandy <bence@ferdinandy.com> writes:
>
> > are there any best practices for keeping notmuch tags synced with an imap
> > folder? It seems to me that simply moving a mail file in the shell from one
> > folder to the other is not something that works well, at least with mbsync
> > the moved file didn't appear in my webmail (I would like to keep a few tags
> > mapped one-to-one with folders so I have a rudimentary access to some tags
> > on my phone and webmail).
>
> As far as I know (as a non-mbsync user) this is only a problem for
> mbsync. Notmuch itself is fine with moving (or copying) files between
> folders. You will have to run notmuch-new afterwards. If I remember
> correctly mbsync encodes an IMAP UUID into the file name, but I don't
> know the details. I guess that the general mbsync instructions for how
> to move messages should work fine with notmuch.

Yes, that is the main issue, as well as "by design" if you use mbsyncs
"native" scheme, which is the fastest option. Alternatively, you can
use the "alternative" scheme ;)

You can also make sure to drop the uuid part from the filename when
you move things around. But for keeping things in-sync you might want
to look at something like https://github.com/afewmail/afew which
allows you to specify mappings. Personally, I ended up mapping only
coarsely (things like Inbox, Spam, Trash, Drafts) and using tag based
search in notmuch. Well, plus mapping some list headers to tags,
moving messages between accounts based on labels, and ... It's really
versatile, and the information is "stored in the tags" (plus folders),
i.e. it does not tie you to an extra db or such.

Michael
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: