Skip to main content

Emails Filter Works Too Good

Comments

4 comments

  • superiorinterne
    I believe that I have finally found the resolve to this problem on my own. It seems that something like this ("$h_from:" matches " .+@.+\.us") will scan everything after the @ for "us" including the domain name part of the email address. So it was picking up things like this user@forus.com. I am not that familiar with regular expression, but what I did was I added another .+ and tested it in a regular expression generator for validity. I have been testing for about 30 minutes and the new filter only seems to look at the extension now, so the new code is this. ("$h_from:" matches " .+@.+.+\.us") I hope this will help anyone that is having the same problem I was.
    0
  • cPanelMichael
    Hello :) I'm happy to see you were able to resolve the issue. Thank you for updating us with the outcome.
    0
  • asmithjr
    I am attempting to use this method in my cpanel_exim_system_filter_custom file also. I have
    logfile /var/log/filter.log if first_delivery and ( ("$h_from:" matches " .+@.+.+\.us") or ("$h_from:" matches " .+@.+.+\.club") or ("$h_from:" matches " .+@.+.+\.work") or ("$h_from:" matches " .+@.+.+\.link") or ("$h_from:" matches " .+@.+.+\.rocks") or ("$h_from:" matches " .+@.+.+\.science") or ("$h_from:" matches " .+@.+.+\.xyz") or ("$h_from:" matches " .+@.+.+\.party") or ("$h_from:" matches " .+@.+.+\.review") or ("$h_from:" matches " .+@.+.+\.date") or ("$h_from:" matches " .+@.+.+\.webcam") or ("$h_from:" matches " .+@.+.+\.eu") or ("$h_from:" matches " .+@.+.+\.ai") or ("$h_from:" matches " .+@.+.+\.is-great.net") or ("$h_from:" matches " .+@.+.+\.download") or ("$h_from:" matches " .+@.+.+\.maropost.com") or ("$h_from:" matches " .+@.+.+\.spectrum.com") or ("$h_from:" matches " .+@.+.+\.top") or ("$h_from:" matches " .+@.+.+\.seuiti.info") ) then logwrite "$tod_log $h_from $h_to $h_subject (it matches)" seen finish endif
    however I see this entry in my filter.log file and I do not understand why.
    2016-01-19 13:47:43 "Facebook" Garry Dinnerman Alisha Alder wants to be friends on Facebook (it matches)
    0
  • cPanelMichael
    It's possible the message matches one of your filter conditions. You may need to consider less direct filtering and rely more on the ACL options available in the Exim Configuration Manager: Exim Configuration Manager - Basic Editor - Documentation - cPanel Documentation Thank you.
    0

Please sign in to leave a comment.