1

I have the following email formats:

v2208.hello@yello.com

d2311.nope@yello.com

y2512.amazon@yello.com

b2101.yesyes@yello.com

I create them on the fly when I sign up to different sites. I'm having an issue with the regex target for the first 6 characters. I'm setting this sieve in proton mail. But I get errors that its not validating. I'm pretty sure my regex is off somehow.

enter image description here

require ["fileinto", "extlists", "imap4flags", "regex"];

if address :list "to" :regex "^[a-z]\d+\d+\d+\d+\.(.*)@yello.com" 
{
  addflag "\\yello.com";
  fileinto "spam";
}
else
{
  fileinto "trash";
}
  • Did you mean to use `:last` (as in *index*) where you wrote `:list`? – anx Aug 19 '22 at 00:07
  • Try `if address :regex "to" "^[a-z]\d\d\d\d+\.(.*)@yello\.com$"` – AnFi Aug 19 '22 at 05:12
  • @AnFi no, that doesnt work neither. I even changed it to just: if address :regex "to" "^[a-z]\d\d\d\d+@yello\.com$" --- and that doesn't match neither when sent to v2209@yello.com --- the syntax is wrong here. the regex looks fine. – Patoshi パトシ Aug 19 '22 at 11:37

0 Answers0