Silently discard emails from a domain/ip

rebouy

Member
PartnerNOC
Sep 1, 2010
21
0
51
We have some very insistent spammers sending junk mails to our server.

Is there a way to silently discard all email from an ip or domain? Firewall or SpamAssassion configuration maybe?

This is not at level account but server wide. If we reject the emails they will just change domain/ip again.

Thank you!
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello,

If they are sending emails to non-existent accounts on a domain, then you can change the default address to :blackhole: rather than :fail: where :blackhole: simply silently discards the emails rather than bouncing them back. The issue with :blackhole: is that it increases the processing needed for the emails, since the server must actually process that email to discard it. The :fail: option actually rejects it without processing as a bounce back to the sender. Most spammers are either spoofing or aren't accepting bounce mail back to their domain, so bouncing an email back to them doesn't really do much. I'd be amazed at any spammer accepting such bounces, since it makes a lot more sense to spoof or not accept return email failures if you are spamming people.

Anyway, if you really want to change to :blackhole:, you can change any set to :fail: to :blackhole: in root SSH using this command:

Code:
replace fail blackhole -- /etc/valiases/*
Thanks.