/etc/spammeripblocks format?

coskel

Registered
Dec 27, 2011
1
0
51
cPanel Access Level
Root Administrator
In another discussion, it was suggested to create a spammerblocks text-based file and place it in the following location:

Simply get a list of IP addresses with subnets for each country you want to ban and add them to your /etc/spammeripblocks

what format is this file?
.txt?

or is it similar to an htaccess, with the dot preceding the entire name?
.spammerblocks

thanks in advance for the help
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
42
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
The file is text-based, but .txt isn't a file extension it uses. The file's name is exactly that indicated of /etc/spammeripblocks without any other name or differences. It should already exist on your system and you could simply add IPs to it by doing the following:

Code:
echo "IP#" >> /etc/spammeripblocks
Please replace IP# with the IP number you want to ban. Of note, you do want the "" around the IP number.

You can see where this exact file name is referenced in /etc/exim.conf file:

Code:
[email protected] [/]# grep spammeripblocks /etc/exim.conf
hostlist spammeripblocks = net-iplsearch;/etc/spammeripblocks
 

quietFinn

Well-Known Member
Feb 4, 2006
1,668
341
438
Finland
cPanel Access Level
Root Administrator
You can also add IPs in
WHM-> Exim Configuration Editor-> Access Lists-> Blacklisted SMTP IPs
You can also use IP blocks, like 192.168.0.1/24