Gnus development mailing list
 help / color / mirror / Atom feed
From: Husain Alshehhi <husain@alshehhi.io>
To: ding@gnus.org
Subject: Advanced Scoring Syntax with "To" and "Cc" Headers
Date: Wed, 06 Mar 2024 20:48:25 -0600	[thread overview]
Message-ID: <877ciesqo6.fsf@> (raw)

From the documentation[1], one can configure complex rules through and,
or, not operators. The documentation also states that match operators
are "header name strings followed by a match and a match type". The
documentation also provides examples[2].

However, all the docs and the examples provide the simple "from",
"body", "subject", "line" match operators. I am unable to create rules
that use "header" or "extra" operators. Ultimately, I want to setup a
rule that scores an message based on the (1) "from" header AND "to"
header, (2) "from" header AND "cc" header, (3) "from" header AND an
arbitrary header.

gnus errors out when parsing the following rules:

--8<---------------cut here---------------start------------->8---
((&
   ("from" "example@domain.com")
   ("to" "example@domain.com")) 10)

((&
   ("from" "example@domain.com")
   ("header" "example@domain.com" "To")) 10)

((&
   ("from" "example@domain.com")
   ("header" "example@domain.com" s "To")) 10)   

((&
   ("from" "example@domain.com")
   ("extra" "To: .*example@domain.com")) 10)
--8<---------------cut here---------------end--------------->8---

Any help is appreciated. Thanks.


[1]
https://www.gnu.org/software/emacs/manual/html_node/gnus/Advanced-Scoring-Syntax.html
[2]
https://www.gnu.org/software/emacs/manual/html_node/gnus/Advanced-Scoring-Examples.html


             reply	other threads:[~2024-03-07  2:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07  2:48 Husain Alshehhi [this message]
     [not found] <39907.3355061532$1709779878@news.gmane.org>
2024-03-07  9:03 ` Eric S Fraga
2024-03-07 15:07 Jakub Ječmínek
2024-03-08  5:16 ` husain
2024-03-08  8:35 Jakub Ječmínek

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

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

  git send-email \
    --in-reply-to=877ciesqo6.fsf@ \
    --to=husain@alshehhi.io \
    --cc=ding@gnus.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.
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 NNTP newsgroup(s).