[sieve][regex] Matching multiple strings in the "Received" header
Adi Pircalabu
adi at ddns.com.au
Mon May 7 06:10:20 EEST 2018
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
More information about the dovecot
mailing list