Block All Mail from hosting provider?

Bashed

Well-Known Member
Dec 18, 2013
146
4
68
cPanel Access Level
Root Administrator
Nothing but spam, phishing emails from OVH.net.

How do I block ALL incoming mail originated from OVH IPs? Can it be done in Spam Expert, Spam Assassin or even CSF?
 

keat63

Well-Known Member
Nov 20, 2014
1,961
267
113
cPanel Access Level
Root Administrator
For a CPANEL domain only, create a global filter in Cpanel

For a whole server, the easiest solution would be to install CSF Mailscanner, but it's not free.
Or modify exim and create an exim_blacklist (search exim_blacklist, there are lots of threads covering this)

Alternatively, you could add the range of IP's to CSF.

https://bgp.he.net/AS16276#_prefixes

Although this could be risky, from what I can make out, OVH are an ISP, so you may also block web traffic.
 
Last edited:

keat63

Well-Known Member
Nov 20, 2014
1,961
267
113
cPanel Access Level
Root Administrator
I guess any combination of:

headers contains, from contains or from ends with would do what you want.

I guess just be mindful that zzovh.net (made up TLD), contains ovh.net, so it has potential still to trip you up, albiet a low risk though.
Could you use a wildcard ?
Eg: If FROM contains *.ovh.net"
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463