* Tag notmuch email based on header values?
@ 2022-10-04 12:04 Petter Reinholdtsen
2022-10-04 12:48 ` Alan Schmitt
2022-10-04 14:32 ` David Bremner
0 siblings, 2 replies; 3+ messages in thread
From: Petter Reinholdtsen @ 2022-10-04 12:04 UTC (permalink / raw)
To: notmuch
I would like to tag all emails with a specific header, but fail to find
a way to do this. Is this a missing feature in notmuch?
To be specific, I want to filter out emails related to request tracker
tickets owned by me at the time of the email. These emails get a simple
RFC 822 style header in each email, that look like this:
RT-Owner: myusername
I tried searching for 'RT-Owner' without any success, and have read the
normuch-search-terms(7) dokucmentation trying to find a clue. Is there
something obvious I am missing.
PS: Please CC me on replies, as I am not subscribed to the list.
--
Happy hacking
Petter Reinholdtsen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Tag notmuch email based on header values?
2022-10-04 12:04 Tag notmuch email based on header values? Petter Reinholdtsen
@ 2022-10-04 12:48 ` Alan Schmitt
2022-10-04 14:32 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: Alan Schmitt @ 2022-10-04 12:48 UTC (permalink / raw)
To: Petter Reinholdtsen, notmuch
[-- Attachment #1.1: Type: text/plain, Size: 899 bytes --]
Hello,
On 2022-10-04 14:04, Petter Reinholdtsen <pere@hungry.com> writes:
> I would like to tag all emails with a specific header, but fail to find
> a way to do this. Is this a missing feature in notmuch?
>
> To be specific, I want to filter out emails related to request tracker
> tickets owned by me at the time of the email. These emails get a simple
> RFC 822 style header in each email, that look like this:
>
> RT-Owner: myusername
>
> I tried searching for 'RT-Owner' without any success, and have read the
> normuch-search-terms(7) dokucmentation trying to find a clue. Is there
> something obvious I am missing.
I use afew for that, with rules like this:
[HeaderMatchingFilter.1]
header = List-Id
pattern = discuss.ocaml.org|caml-list.inria.fr
tags = +caml;+lists
I only run it on new mail. If you run afew without the --new flag, I
think it applies it to all mail.
Best,
Alan
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 528 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Tag notmuch email based on header values?
2022-10-04 12:04 Tag notmuch email based on header values? Petter Reinholdtsen
2022-10-04 12:48 ` Alan Schmitt
@ 2022-10-04 14:32 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2022-10-04 14:32 UTC (permalink / raw)
To: Petter Reinholdtsen, notmuch
Petter Reinholdtsen <pere@hungry.com> writes:
> I would like to tag all emails with a specific header, but fail to find
> a way to do this. Is this a missing feature in notmuch?
>
> To be specific, I want to filter out emails related to request tracker
> tickets owned by me at the time of the email. These emails get a simple
> RFC 822 style header in each email, that look like this:
>
> RT-Owner: myusername
>
> I tried searching for 'RT-Owner' without any success, and have read the
> normuch-search-terms(7) dokucmentation trying to find a clue. Is there
> something obvious I am missing.
>
> PS: Please CC me on replies, as I am not subscribed to the list.
>
You can add RT-Owner as header to index (see notmuch-config(1)) and re-index.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-04 14:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04 12:04 Tag notmuch email based on header values? Petter Reinholdtsen
2022-10-04 12:48 ` Alan Schmitt
2022-10-04 14:32 ` David Bremner
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).