Multiple changes.

- Use the ARC memory model for release builds.
 - Move logfile to a command line switch, to avoid chicken-and-egg logging when failing to parse YAML.
 - Fix logic bug: Stop processing rules on a good match
 - Add performance timer and memory used when logging to file
 - Rename 'headers' to 'match' in configuration file, more intention revealing
 - Add logger explicit flock (unlock) at process exit

FossilOrigin-Name: 7c439d99044b8d725c2dc1a806eec14fff7f0675afb14920de3c7c2581907640
This commit is contained in:
Mahlon E. Smith 2023-06-29 12:58:42 +00:00
parent 5b2e0b52bc
commit a938cf045a
7 changed files with 110 additions and 59 deletions

View file

@ -2,15 +2,13 @@
# Example Sieb configuration file.
#
# Default, no logging. Relative to homedir.
logfile: sieb.log
## Rules tried before global filtering
# Rules tried before global filtering.
#
early_rules:
-
headers:
TO: mhlon@(laika|ravn)
received: .*sendgrid.*
match:
TO: ahlon@(laika|ravn|martini)
filter:
- [ reformail, -A, "X-Sieb: This matched." ]
deliver: .whatever
@ -27,9 +25,18 @@ filter:
##
rules:
-
headers:
x-sieb: global
deliver: .whoas
match:
x-one: global
-
match:
Subject: .*\s+corepacket\s+.*
deliver: .balls
filter:
- [ reformail, -A, "X-Sieb: Boom!" ]
-
match:
x-three: global
# # Magic "TO" which means To: OR Cc:
# -