Forum Discussion

Mick536's avatar
Mick536
New Contributor III

Regex Email Filters

Hello all -

First time poster here.  The new email system has taken away the "does not contain" option for making an email filter, and with it then my favorite filter. I had a final filter set that said: If To does not contain mylastname AND cc does not contain mylastname then put the email in my spam folder.  (Mylastname would have to be in bcc).  Thus many list servers would go to spam.  If I found I wanted one of those upon review, I would make allowance for that in an earlier filter.  Worked like a champ for 20 years.

So I set out to make a replacement with regex, and it's been difficult. I am not a regex noob, but there are many flavors of it.  Cox seems to be using the Open-Exchange version (I know because that's what complains about my errors ) but I can't find out anything about what and which that engine supports. If anyone knows of a pertinent link, I would appreciate the steer.

I do believe that Open-Exchange does not support look-ahead, which makes exclusionary matching very hard. For those of you who have successful regex rules, would you please reply with an example? I presume that if the appropriate string is found, the rule is satisfied and executed.  Is all that goes into the rule the regular expression?

I ask because I've tried the very simple and too broad rule of [^lettersofmylastname] to force a result, and that doesn't work. I'm figuring my approach is incomplete.  Is there a Cox tutorial out there?  I'd appreciate any lessons learned.

Thanks for reading, and season's cheer.

3 Replies

Replies have been turned off for this discussion
  • @Mick536,

    I suggest using no more than 3 words in the filter settings. This seems to create the more reliable rule filters. 

    Thanks,

    Allan - Cox Support Forums Moderator

  • Mick536's avatar
    Mick536
    New Contributor III

    Hi Allan -

    I am talking about filtering on only ONE word: mylastname.  My last name is part of my email address.  I want a filter that says if my last name is NOT on the To: line AND NOT on the cc: line, since it must be on the bcc: line, move this email to the spam folder.  I'll review it later.

    I could do this a week ago with the "does not contain" setting.  Now I don't know how.  Is there a way?  This regex ^((?!mylastname).)*$ from https://www.regextester.com/15 bounces, either because of the nested word, or the lookahead, I'm not sure which.

    So, whither now?

    Thanks,

  • @Mick536,

    Sadly, we do not have a manual or tutorial for setting up filters at this time.

    Thanks,

    Allan - Cox Support Forums Moderator.