You are currently viewing How To Filter Incoming E-mail Messages By IP Address cPanel?

How To Filter Incoming E-mail Messages By IP Address cPanel?

Email communication is a critical aspect of online interactions, and sometimes, you may want to filter incoming messages based on their source IP addresses for enhanced security or organization. In cPanel, this process can be efficiently managed through the built-in email filtering features. This article is a detailed guide for how to filter incoming e-mail messages by IP address cPanel in which we’ll cover steps to filter incoming messages by IP address. This guide is an essential component of our cPanel server management service, so read the complete article to understand everything easily. Let’s walk through the steps to filter incoming email messages by IP address in cPanel.

How to filter incoming e-mail messages by IP address cPanel?

Determining the IP Address to Filter

All email messages carry information about their origin in the headers. To filter based on IP addresses, you need to locate the IP in the message headers, usually found in the “Received:” header.

Examine Message Headers:

  • Inspect the raw email message headers.
  • Look for the IP address in the “Received:” header.

Setting up Email Filters in cPanel:

  • Once you identify the IP address for filtering, follow these steps in cPanel:

Log in to cPanel:

  • Access your cPanel account.

Open Email Filtering Tool:

For Jupiter theme users:

  • Navigate to the Tools page, find Email Filters in the Email section.
  • To create a filter for a specific account, click on Email Filters, then Manage Filters.
  • To create a global email filter, click Global Email Filters.

For Paper Lantern theme users:

  • In the EMAIL section on the cPanel home page, find Email Filters.
  • Choose Email Filters for an account-specific filter or Global Email Filters for a global filter.

Create a New Filter:

  • Click on “Create a New Filter.”

Define Filter Name:

  • Give your filter a name in the Filter Name text box.

Set Filter Rules:

Under Rules, select “Any header” in the From list box.

Choose “matches regex” in the contains list box.

In the text box, input the regex for the specific IP address, replacing “xxx” with the IP digits.

  • Example for a specific IP: ^$
  • Example for a range: ^[0-9]{1,3}$

Actions for Matched Emails:

  • Under Actions, choose what to do with matching emails (discard, move to a folder, redirect, etc.).

Finalize and Create:

  • Click on “Create.” The new filter becomes active immediately.


By following these user-friendly steps, you can easily filter incoming e-mail messages by IP address cPanel to manage incoming messages based on IP addresses. This adds a layer of control and organization to your email communication, ensuring a more streamlined and secure inbox experience.

With this article, we explored how to filter incoming e-mail messages by IP address cPanel with easy to understand steps.  By following these best practices organizations can properly filter out incoming e-mail messages . If you want to know more about cPanel and other services we provide or facing any issues you can contact us any time of the day.