unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Michael J Gruber <michaeljgruber+grubix+git@gmail.com>
To: David Bremner <david@tethera.net>
Cc: Bence Ferdinandy <bence@ferdinandy.com>, notmuch@notmuchmail.org
Subject: Re: best practices for keeping a notmuch tag in sync with maildir folder
Date: Mon, 5 Sep 2022 13:44:48 +0200	[thread overview]
Message-ID: <CAA19uiQH1LujpCHK4K+A-OG+niE2sTQUn4tPqX6XJ20q5tVFZw@mail.gmail.com> (raw)
In-Reply-To: <87h71m5a44.fsf@tethera.net>

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

      reply	other threads:[~2022-09-05 11:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-13 20:54 best practices for keeping a notmuch tag in sync with maildir folder Bence Ferdinandy
2022-09-05 11:33 ` David Bremner
2022-09-05 11:44   ` Michael J Gruber [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA19uiQH1LujpCHK4K+A-OG+niE2sTQUn4tPqX6XJ20q5tVFZw@mail.gmail.com \
    --to=michaeljgruber+grubix+git@gmail.com \
    --cc=bence@ferdinandy.com \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).