View Single Post
Old 21 Jan 2022, 07:04 AM   #6
JeremyNicoll
Essential Contributor
 
Join Date: Dec 2017
Location: Scotland
Posts: 484
Quote:
Originally Posted by Mr David View Post
One way of the other FM's sieve is currently very fussy about making allowances for double-quotes.

For example:

if header :matches "From" "*Flypaper Media*" {
==> discarding message

if header :matches "From" "*Flypaper Media & Publicity" {
==> keeping message

if header :matches "From" "*Flypaper Media & Publicity*" {
==> discarding message
The first example discards because the value that's matched against starts and ends with asterisk which, in the "matches" test, matches arbitrary characters. So the test there is that the value of the "From" header is 'Flypaper Media' preceded or followed (or both) by other chars.

The second example keeps the message because the condition does not match. It's nothing to do with whether there's a double-quote at the start of the From header's value. It's because the righthand end of the test value has no asterisk and therefore means 'Publicity' followed by nothing else. The actual header has a space then an email address enclosed in angle brackets after the stuff in quotes.
JeremyNicoll is offline   Reply With Quote