Block all inbound emails except specific list?

z3d3m0n

Well-Known Member
Feb 8, 2016
59
3
58
Prague
cPanel Access Level
Root Administrator
Hello Community,

i run a small commercial email server and i don't want to deal with spam , is there a way how to block incoming domains, emails except for a certain list?

thx
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Hello @z3d3m0n,

The following thread offers some user-submitted examples that you may find helpful:

Block incoming emails from domain

You'd simply need to adjust the filter rule to block email from a domain name that's NOT from a list of domain names.

Thank you.
 
  • Like
Reactions: z3d3m0n

keat63

Well-Known Member
Nov 20, 2014
1,963
267
113
cPanel Access Level
Root Administrator
If you want to do this at server level, then you may have to look at something like CSF mailscanner.
Also, there is an exim mod to block domains, but i found it tempremental.
Search for exim_blacklist, it will appear somewhere.

Alterntively, if you want to do this at domain level then a global email filter in your cpanel will do this.
Although compiling the rule could be tedious.