Authentication-Results: mail-b.sr.ht; dkim=none Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by mail-b.sr.ht (Postfix) with ESMTPS id B3A1111EFBF; Sat, 13 Nov 2021 21:02:11 +0000 (UTC) Received: (Authenticated sender: robin@jarry.cc) by relay10.mail.gandi.net (Postfix) with ESMTPSA id EB42B240004; Sat, 13 Nov 2021 21:02:09 +0000 (UTC) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 13 Nov 2021 22:02:09 +0100 Message-Id: Cc: <~sircmpwn/aerc@lists.sr.ht> Subject: Re: notmuch workflow example From: "Robin Jarry" To: "Kalyan Sriram" , <~rjarry/aerc-devel@lists.sr.ht> References: <0101017d1a7728df-ba7ea1a9-1ca8-42f3-91fc-324639ca057d-000000@us-west-2.amazonses.com> In-Reply-To: <0101017d1a7728df-ba7ea1a9-1ca8-42f3-91fc-324639ca057d-000000@us-west-2.amazonses.com> Kalyan Sriram, Nov 13, 2021 at 19:02: > I have multiple accounts that I manage, both via Gmail and self hosted > (postfix/dovecot). For syncing the self hosted one, I use mbsync, > followed by a notmuch tagging script. For GMail, I was using mbsync, but > I've recently started using > [lieer](https://github.com/gauteh/lieer), which I'm pleased with so far. > It handles both syncing GMail to a local maildir and converting gmail > labels <-> notmuch tags. Oh this reminds me that I had tried out that project a few years ago. I really liked the concept but not the way it was implemented. I gave myself the challenge to create a similar tool but I never got to use it extensively. If you have a chance, I would really like some feedback :) https://git.sr.ht/~rjarry/notmuch-gmail I have just taken out the code from the grave and giving it a test run. It looks like it still works :) > > How do you set the copy-to=3D option? > This is where it gets messy. Notmuch doesn't have a concept of copy-to. > The funny thing is, I did some testing, and GMail seems to (lmk if your > mileage varies) copy things to its own sent folder whether or not the > mail client does that. This is working out for me, though, because lieer > synchronizes that and tags all messages in that folder with `sent`, > which I use as a query in my gmail query-map `sent=3Dtag:sent`. IIRC > you're using GMail, so this should work for you. > > Regarding my self-hosted account, I'm still trying to figure out how to > do this. Currently the best solution I can think of is setting up > postfix to BCC on every email, and then using notmuch to tag those > emails. It looks like this should be handled by the email client itself. copy-to=3D should do something special depending on the account type. For imap/maildir, it only means saving the message in a folder. However for notmuch, it would require some additional steps. Maybe a completely different action. What do you think? > No problem! There's some other things I'm figuring out as I go, so I'll > probably make a blog article at some point (hopefully soon) with all > this information. I'll share that when I do :) Thanks a lot for all this. By the way, I don't know how aerc handles "delete" and "archive" with a notmuch account. Does it involve adding/removing tags? --=20 Robin