cPanel Email Filter for IP Range

I recently needed to block a large amount of incoming email via IP range in cPanel for a single account versus blocking the IP range on the entire server. This was accomplished using cPanel’s Account Level Filtering for Mail.

Here is the filter setting using 192.168.0.0/24 as an example.

Rules:
Any Header
matches regex
192\.168\.\d{1,3}\.\d{1,3}

Action:
Discard Message

cpanel mail filter

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>