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
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
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.
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
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?