Exim Blacklist -> *domain doesn't work

vagkaefer

Member
Jun 25, 2014
20
0
1
cPanel Access Level
Root Administrator
I have a manual filter in the exim. It was done this way:

In section: "CONFIG". I put:

domainlist exim_blacklist lsearch;/etc/eximblacklist

In Section: "PREROUTERS". I put:

driver = redirect
# RBL Blacklist incoming hosts
domains = +exim_blacklist
allow_fail
data = :fail: Connection rejected: SPAM source $domain is manually blacklisted.

So I put a host in each line of the file /etc/eximblacklist. Works perfectly, the emails are blocked.

But sometimes i need to use a "wildcard". For example, I like to block all senders of the .tk domains.

I thought I'd use: * .tk

But it does not work, how do I use the "wildcard"?
 

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
You can try to create your custom filter in your /usr/local/cpanel/etc/exim/sysfilter/options/ directory and try to enable it through WHM->Exim Configuration Manager->Basic Editor->Filters

Create /usr/local/cpanel/etc/exim/sysfilter/options/inbound_tld_block file and add following code

Code:
if first_delivery
and ("$h_to:, $h_cc:" contains ".tld")
or ("$h_from:" contains ".tld")
then
seen finish
endif
To disable the filter, you can set it to “Off” in the WHM->Exim Configuration Manager->Basic Editor->Filters : "** Custom Filter: inbound_tld_block"
 
  • Like
Reactions: vagkaefer

vagkaefer

Member
Jun 25, 2014
20
0
1
cPanel Access Level
Root Administrator
You can try to create your custom filter in your /usr/local/cpanel/etc/exim/sysfilter/options/ directory and try to enable it through WHM->Exim Configuration Manager->Basic Editor->Filters

Create /usr/local/cpanel/etc/exim/sysfilter/options/inbound_tld_block file and add following code

Code:
if first_delivery
and ("$h_to:, $h_cc:" contains ".tld")
or ("$h_from:" contains ".tld")
then
seen finish
endif
To disable the filter, you can set it to “Off” in the WHM->Exim Configuration Manager->Basic Editor->Filters : "** Custom Filter: inbound_tld_block"
Worked fine! Tks so much!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Hello :)

Thank you for taking the time to let us know it worked. I'm marking this thread as resolved.