Content Filtering
Question asked by Bryan Quickmire - 10/4/2023 at 8:28 AM
I am trying to create a content filter that will catch TLDs that generate nothing but spam.

For example .ru .su .in etc. So I created a filter as follows:

"From address" "From specific domains" "Matches"

The list includes *.ru *.su *.in etc one per line.

Unfortunately for my plan the content filter catches any domain that includes *.xy but not necessarily ending in *.xy - the .xy ca be followed by other characters.

This means when I try to catch .in I also catch @payments.interac.ca which is not good when the action specified is Bounce!

Any suggestions on how to achieve just catching the TLD?


1 Reply

Reply to Thread
Matthew Leyda Replied
I got info from Scarab back in 2015 for this problem that solved this problem for me.                  
                   Scarab Replied                   
                                                                                                                                                    Marked As Answer                    
I'm beginning to understand why SmarterTools staff is always silent on the subject of Custom Rules in SmarterMail. It is very finicky. After some experimentation I got my rules to work 100% of the time with the following alterations:
Rule Source: Header
Header: Return-Path
Rule Type: Regular-Expression
Weight: (variable based upon your Low/Med/High weights)
Rule Text: .+\.link>$
(et cetera for each top-level domain you want to catch)
Using .+ instead of .* shouldn't make too much of a difference, but can in some unique circumstances, but the important missing piece was the ending > before the end of the string $. Not sure why it would work sometimes without with ending > and not other times, but I was able to confirm that was the problem.
The other thing to note is do not put a : at the end of your Header field as the Custom Rules assumes a : and putting one in that field will result in it never matching (as it will be looking for Return-Path::). 
The same RegEx above should work with the From or Return-Path fields if you would prefer using those.

Hope this saves someone else some head-scratching frustration in the future.
                   Report Abuse
Kendra Support http://www.kendra.com support@kendra.com 425-397-7911 Junk Email filtered ISP

Reply to Thread