View Single Post
Old 14 May 2026, 06:50 AM   #2
JeremyNicoll
Cornerstone of the Community
 
Join Date: Dec 2017
Location: Scotland
Posts: 853
You don't need quotes.
You don't have to indicate case insensitivity.
You don't need leading or trailing dot asterisk

Just: (trash|reminder|landscaping) should work.


Whn googling for help bear in mind that Sieve (which is the language that the filter rules get translated into from what you specify in the FM GUI) uses "POSIX" regexes. It's not PCRE.

You might find this useful: https://www.regular-expressions.info/posix.html

Also: https://www.regular-expressions.info/refflavors.html ... which allows you to follow a link to a sub-topic (eg character classes) & will then offer you the chance to nominate two flavours of regex (eg PCRE if you know that well) & POSIX ... & let you see to what extent those flavours of regex implement various things.


I should add that - if you look at the Sieve rules generated from the GUI - you'll see some escaping of characters - which you don't (as far as I know ) need to do yourself in your GUI rules - indeed if you do escape stuff in the GUI it'll (probably) be doubled in what's generated. The distinction matters because most of the advice on the internet for this sort of filtering (Sieve) is for people writing rules directly in Sieve (which in fact FM's system allows you to do if you need to).

If there's any chance that you'd want to write your own Sieve rules you really need to read the RFCs (technical specs for lots of internet stuff) for Sieve ... which are hard going if you've not got an academic Computing background. These include:

https://tools.ietf.org/html/rfc3028 the original Sieve RFC, made obsolete by

https://tools.ietf.org/html/rfc5228 a newer base Sieve specification

https://tools.ietf.org/html/rfc2244 describes comparators, eg for testing INTEGERS

https://tools.ietf.org/html/rfc3431 adds: counting and value-comparison tests; see rfc5231 too

https://tools.ietf.org/html/rfc5173 adds: testing of BODY contents

https://tools.ietf.org/html/rfc5229 adds: "Variables" support

https://tools.ietf.org/html/rfc5231 .... improves rfc3431

https://tools.ietf.org/html/rfc5293 adds: "editheader" support to add/delete headers

https://tools.ietf.org/html/rfc5429 adds: REJECT and extended EREJECT

https://tools.ietf.org/html/rfc6785 adds: IMAP

Last edited by JeremyNicoll : 14 May 2026 at 07:50 AM.
JeremyNicoll is offline   Reply With Quote