unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* best practices for keeping a notmuch tag in sync with maildir folder
@ 2022-08-13 20:54 Bence Ferdinandy
  2022-09-05 11:33 ` David Bremner
  0 siblings, 1 reply; 3+ messages in thread
From: Bence Ferdinandy @ 2022-08-13 20:54 UTC (permalink / raw)
  To: notmuch


[-- Attachment #1.1: Type: text/plain, Size: 630 bytes --]

Hi,

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).

It seems to me notmuch-insert might be used (abused?) for this, but that
changes the delivery time of the email which is undesirable. Any ideas on
how I could do this?

Thanks,
Bence

-- 
+36305425054
bence.ferdinandy.com

[-- Attachment #1.2: Type: text/html, Size: 938 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: best practices for keeping a notmuch tag in sync with maildir folder
  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
  0 siblings, 1 reply; 3+ messages in thread
From: David Bremner @ 2022-09-05 11:33 UTC (permalink / raw)
  To: Bence Ferdinandy, notmuch

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: best practices for keeping a notmuch tag in sync with maildir folder
  2022-09-05 11:33 ` David Bremner
@ 2022-09-05 11:44   ` Michael J Gruber
  0 siblings, 0 replies; 3+ messages in thread
From: Michael J Gruber @ 2022-09-05 11:44 UTC (permalink / raw)
  To: David Bremner; +Cc: Bence Ferdinandy, notmuch

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-05 11:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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).