TLD filtering question?

Discussion forum for Enterprise Edition.
Post Reply
kiamori
Posts: 329
Joined: Wed Nov 04, 2009 1:39 am
Contact:

TLD filtering question?

Post by kiamori »

We have a custom rule setup to filter some Top Level Domains. For example

Script is:

Code: Select all

FilterResult=0
If CriteriaMet([ME_HEADERS_CONTAIN],"<REFERENCE><FILE>TLD.txt</FILE><PATH>D:\ME\Config\Filters\Patterns</PATH><REFERENCE>") Then
FilterResult=1
End If
inside of the TLD.txt file we have

Code: Select all

*.xyz*
*.wang*
*.date*
*.stream*
*.top*
*.win*
*.faith*
*.loan*
*.racing*
*.club*
*.website*
*.ml*
*.review*
*.fun*
*.best*
but for some reason its not triggering. What is the problem here?

kiamori
Posts: 329
Joined: Wed Nov 04, 2009 1:39 am
Contact:

Re: TLD filtering question?

Post by kiamori »

In the mean time I've updated the SMTP-Inbound.VBS script found under Services > SMTP > Properties > Advanced SMTP

I added the following script:

Code: Select all

Blacklist=array("xyz","wang","bid","trade","date","stream","top","win","faith","loan","racing","club","shop","website","icu","ml","review","fun","best","app")

for each DomainName in Blacklist

if InStr("%SENDER%","."&DomainName&"]")>0 then
ME_ResultData="554 5.7.1 ."&DomainName&" domains not allowed to send email to this server."&Chr(13)&Chr(10)
ME_Mail=ME_Failure
Exit Function
end if
next
within the

Code: Select all

function ME_MAIL()
just above the

Code: Select all

ME_MAIL = ME_Success

end function
Which works to block all emails from these TLD's but in some cases we don't want to block them entirely just mark them as spam so having the filters work correctly is a requirement.

cdobbs
Posts: 1
Joined: Wed Mar 20, 2013 6:41 pm

Re: TLD filtering question?

Post by cdobbs »

I must be missing something.

I can not get the external script SMTP-Inbound.VBS to work.

I am mainly trying to block .cam

This is what the script file looks like..

function ME_MAIL()

' if %SENDERAUTH%=1 then
' ME_ResultData = "250 %SENDER% connection from %IPADDRESS% authenticated." & Chr(13) & Chr(10)
' else
' ME_ResultData = "250 %SENDER% OK." & Chr(13) & Chr(10)
' end if

Blacklist=array("cam","xyz","wang","bid","trade","date","stream","top","win","faith","loan","racing","club","shop","website","icu","ml","review","fun","best","app")

for each DomainName in Blacklist

if InStr("%SENDER%","."&DomainName&"]")>0 then
ME_ResultData="519 5.7.1 ."&DomainName&" domains not allowed to send email to this server."&Chr(13)&Chr(10)
ME_Mail=ME_Failure
Exit Function
end if
next

ME_MAIL = ME_Success <<<< I have even changed this to ME_Failure just for a test and would expect all email would fail. But no change

end function

I do have Enable script function for MAIL FROM command checked

Thank you for any help.

dcol
Posts: 237
Joined: Fri May 26, 2017 11:25 pm

Re: TLD filtering question?

Post by dcol »

I have been trying the same type of script also without success. I think ME just can't handle it. I did start a support ticket for this. See where that goes.
Can anyone help with this?

Post Reply