Reputation: 3
I have been running a personal email server and looking to create some useful sieve rules. I have had a crack at creating the following rule to match on emails where an account password or similar has been reset but my regex is not matching as I expect.
Is my syntax correct
Appreciate any pointers to where I have gone wrong.
Thanks
require ["imap4flags", "envelope", "fileinto", "mailbox", "subaddress", "variables", "body", "regex", "editheader"];
## Rule: Alert on account and password changes ###
if anyof (header :regex ["Subject"] [
".* (account|password|address|email) .* (changed|reset|updated).*",
".* (change[d]?|reset|updated).*(account|password|account|address|email) .*",
"unrecogni(z|s)ed (login|device)",
"new login",
"security notice"]){
setflag "\\Flagged";
}
if anyof (body :regex [
"If you have not authorized",
"If you (didn\'t|did not) (request|change)",
".* (account|password|account|address|email) .* (changed|reset|updated).*",
".* (change[d]?|reset|updated).*(account|password|account|address|email) .*",
"Unrecognized (Login|device)",
"new device",
"Security notice"]) {
setflag "\\Flagged";
}
Upvotes: 0
Views: 33