Add the magic 'TO' header.

Checks both To: and Cc: as an OR, without needing to specify both in separate rules.

FossilOrigin-Name: e8cde0ba2d9b19089d80aeea455d6d6024cda477e206f567a379fd1b1d596815
This commit is contained in:
Mahlon E. Smith 2023-06-21 04:14:54 +00:00
parent 2952e2cbd7
commit f0221aac0a
4 changed files with 57 additions and 37 deletions

View file

@ -3,13 +3,13 @@
#
# Default, no logging. Relative to homedir.
#logfile: sieb.log
logfile: sieb.log
## Rules tried before global filtering
early_rules:
-
headers:
to: mahlon@(laika|ravn)
TO: mahlon@(laika|ravn)
received: .*sendgrid.*
filter:
- [ reformail, -A, "X-Sieb: This matched." ]
@ -17,7 +17,7 @@ early_rules:
## Filter message before additional rules.
filter:
- [ reformail, -A, "X-Sieb: That shit totally matched" ]
- [ reformail, -A, "X-Sieb: Processed!" ]
## Ordered, top down, first match wins.
## Headers are lowercased. Multiple matches are AND'ed.
@ -25,12 +25,11 @@ filter:
## Delivery default is ~/Maildir, any set value is an auto-created maildir under
## that path.
##
# rules:
# -
# headers:
# x-what: pcre-matcher
# poonie: pcre-matcher
# deliver: .whatever
rules:
-
headers:
x-sieb: global
deliver: .whoas
# # Magic "TO" which means To: OR Cc:
# -