View Single Post
Old 20 Jan 2022, 08:16 PM   #3
JeremyNicoll
Essential Contributor
 
Join Date: Dec 2017
Location: Scotland
Posts: 484
The Sieve condition

if header :matches "From" "Flypaper Media*" {

is testing for a From header value that starts with an 'F' but in this example

From: "Flypaper Media & Publicity" <compromisedaccount@outlook.com>

the first character is a double-quote. I would think you either need to use eg

if header :matches "From" "*Flypaper Media*" {

ie look for 'Flypaper Media' preceded or followed by other characters, or
explicitly look for the double quote at the start with

if header :matches "From" "\"Flypaper Media*" {


I checked this assumption by temporarily changing an existing condition that's defined via the GUI in my rule set so it contained a double-quote, then using the "browse sieve rules" option to see how FM's code generated the sieve test for that rule. If you want a literal double-quote in the condition it needs to be 'escaped' with a leading backslash so it's not confused with the double-quotes that enclose a test value.

Maybe previously the mails that you think were filtered ok didn't enclose the sender's name in double quotes?
JeremyNicoll is offline   Reply With Quote