How to block mail in cpanel

In cPanel, you can block mail from a specific sender or domain using the "Email Filters" feature. Here's a step-by-step guide:

Method 1: Block mail from a specific sender

  1. Log in to your cPanel account.
  2. Click on the "Email" tab.
  3. Click on "Email Filters" under the "Email" section.
  4. Click on the "Add Filter" button.
  5. In the "Filter Name" field, enter a name for the filter (e.g., "Block spam from [email protected]").
  6. In the "Pattern" field, enter the email address of the sender you want to block (e.g., [email protected]).
  7. In the "Action" dropdown menu, select "Discard".
  8. Click the "Save" button.

Method 2: Block mail from a specific domain

  1. Log in to your cPanel account.
  2. Click on the "Email" tab.
  3. Click on "Email Filters" under the "Email" section.
  4. Click on the "Add Filter" button.
  5. In the "Filter Name" field, enter a name for the filter (e.g., "Block mail from example.com").
  6. In the "Pattern" field, enter the domain name you want to block (e.g., example.com).
  7. In the "Action" dropdown menu, select "Discard".
  8. Click the "Save" button.

Method 3: Block mail using a regular expression

  1. Log in to your cPanel account.
  2. Click on the "Email" tab.
  3. Click on "Email Filters" under the "Email" section.
  4. Click on the "Add Filter" button.
  5. In the "Filter Name" field, enter a name for the filter (e.g., "Block spam using regex").
  6. In the "Pattern" field, enter a regular expression that matches the email addresses you want to block (e.g., @example\.com$).
  7. In the "Action" dropdown menu, select "Discard".
  8. Click the "Save" button.

Note: Regular expressions can be complex and may require some knowledge of regex syntax. If you're not familiar with regex, it's recommended to use Method 1 or Method 2 instead.

After creating the filter, any emails that match the specified sender, domain, or regular expression will be discarded and not delivered to your email account.