Skip to main content

Regex not filtering correctly

Answered

Comments

4 comments

  • a marx

    Just showing the .pro domain made it through the mail filter.. shouldn't have happened

    .. and the test showing the regex is working.

    0
  • a marx

    Still banging on this issue as everything being shown to me is showing that the mail should be delivered... but it's being filtered, why?

    Here's another attempt that also has failed... 

    \.(?!com$|net$|org$|int$|edu$|gov$|mil$|biz$|coop$|us$)[A-Za-z]{2,}$

     

    0
  • DennisMidjord

    View the source of the email and check the value of the "From" header. I think your issue is that your regex is too strict 

    You'll most likely see something like this: 

    From: WordPress <wordpress@domain.com>

    Your regex does not match the above header.

    0
  • a marx

    I believe I have a working version, posted in case anyone else is interested... thanks for the input.

    (From):.*@[a-zA-Z0-9.-]+\.(?!(com|net|org|int|edu|gov|mil|biz|coop|us)\b)[a-z]{2,}\b

    0

Please sign in to leave a comment.