7 May
2018
7 May
'18
6:10 a.m.
On 07-05-2018 12:13, Adi Pircalabu wrote:
I'm trying to use this expression in Sieve, but for some reason the filter doesn't work:
require ["fileinto","regex"];
# rule:[gmail-outlook-yahoo-aol-friends] if header :regex "received" ".from.*(outbound.protection.outlook.com|.google.com|.yahoo.com|mx.aol.com)." { fileinto "INBOX.gmail-hotmail-yahoo-aol-friends"; stop; }
Update: this works:
if header :regex "received" "from.*(outbound.protection.outlook.com|.google.com|.yahoo.com|mx.aol.com)" { fileinto "INBOX.gmail-hotmail-yahoo-aol-friends"; stop; }
How should I write it to also match the space character at both the beginning and end of the expression?
Adi Pircalabu