Subject says it all.
From 3a19ae344c39763e1c54e6e263c6f552bff6eb2f Mon Sep 17 00:00:00 2001 From: Mono DHS <[email protected]> Date: Mon, 20 Jul 2020 13:21:37 +0200 Subject: [PATCH] Add support for the Reply-To (RFC 5322, 3.6.2. Originator Fields) pattern modifier.
---
doc/manual.xml.head | 1 +
mutt.h | 1 +
pattern.c | 4 ++++
3 files changed, 6 insertions(+)
diff --git a/doc/manual.xml.head b/doc/manual.xml.head
index
5276953059e453592c2832db5abed4ec6a500395..91ea427bd0258bd4e363920607dc7478d6f57b08
100644
--- a/doc/manual.xml.head
+++ b/doc/manual.xml.head
@@ -5732,6 +5732,7 @@ shows several ways to select messages.
<entry>~P</entry>
<entry>messages from you (consults <link linkend="from">$from</link>,
<command>alternates</command>, and local account/hostname information)</entry>
</row>
+<row><entry>~q <emphasis>EXPR</emphasis></entry><entry>messages which contain
<emphasis>EXPR</emphasis> in the <quote>Reply-To</quote> field</entry></row>
<row><entry>~Q</entry><entry>messages which have been replied to</entry></row>
<row><entry>~r
[<emphasis>MIN</emphasis>]-[<emphasis>MAX</emphasis>]</entry><entry>messages
with <quote>date-received</quote> in a Date range</entry></row>
<row><entry>~R</entry><entry>read messages</entry></row>
diff --git a/mutt.h b/mutt.h
index
4413739ff0748215807e8a7d3e9d803bdeabd26e..cc6148ede009a21073139592230f7b3e305b13b2
100644
--- a/mutt.h
+++ b/mutt.h
@@ -271,6 +271,7 @@ enum
MUTT_XLABEL,
MUTT_MIMEATTACH,
MUTT_MIMETYPE,
+ MUTT_REPLY_TO,
/* Options for Mailcap lookup */
MUTT_EDIT,
diff --git a/pattern.c b/pattern.c
index
eb403ac3f8891d85ad7d2d6f944ebc316c239224..6e08cccfd3a34ea87cdb87773ce72c7f0f6d1517
100644
--- a/pattern.c
+++ b/pattern.c
@@ -83,6 +83,7 @@ Flags[] =
{ 'O', MUTT_OLD, 0, NULL },
{ 'p', MUTT_PERSONAL_RECIP, 0, NULL },
{ 'P', MUTT_PERSONAL_FROM, 0, NULL },
+ { 'q', MUTT_REPLY_TO, 0, eat_regexp },
{ 'Q', MUTT_REPLIED, 0, NULL },
{ 'r', MUTT_DATE_RECEIVED, 0, eat_date },
{ 'R', MUTT_READ, 0, NULL },
@@ -1468,6 +1469,9 @@ mutt_pattern_exec (struct pattern_t *pat,
pattern_exec_flag flags, CONTEXT *ctx,
case MUTT_CC:
return (pat->not ^ match_adrlist (pat, flags & MUTT_MATCH_FULL_ADDRESS,
1,
h->env->cc));
+ case MUTT_REPLY_TO:
+ return (pat->not ^ match_adrlist (pat, flags & MUTT_MATCH_FULL_ADDRESS,
1,
+ h->env->reply_to));
case MUTT_SUBJECT:
return (pat->not ^ (h->env->subject && patmatch (pat, h->env->subject)
== 0));
case MUTT_ID:
--
2.11.0
signature.asc
Description: PGP signature
