Block IPs from sending you email

n this article I'm going to quickly go over how you can block certain IP addresses from being able to send you an email.


Account level mail filter to block IP range

In this example, I'm going to be using a fictional IP range of [ -] and adding that to an account level mail filter in cPanel, so that I don't receive any more spam from any users on that network.

  1. Login to your cPanel.
  3. Click on Create a New Filter.
  4. Name the filter Block IPs, under the Rules section change the From drop-down to Any header, and change the equals drop-down to contains. In the field below those type in 256.256.256. or the beginning of the IP address range you'd like to block, or just a full single IP address to block just one.
  6. Finally, click on Create.

That's all there is to it, and you should now know how to block IP addresses from sending you an email on an account level!