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
- Log in to your cPanel account.
- Click on the "Email" tab.
- Click on "Email Filters" under the "Email" section.
- Click on the "Add Filter" button.
- In the "Filter Name" field, enter a name for the filter (e.g., "Block spam from [email protected]").
- In the "Pattern" field, enter the email address of the sender you want to block (e.g., [email protected]).
- In the "Action" dropdown menu, select "Discard".
- Click the "Save" button.
Method 2: Block mail from a specific domain
- Log in to your cPanel account.
- Click on the "Email" tab.
- Click on "Email Filters" under the "Email" section.
- Click on the "Add Filter" button.
- In the "Filter Name" field, enter a name for the filter (e.g., "Block mail from example.com").
- In the "Pattern" field, enter the domain name you want to block (e.g., example.com).
- In the "Action" dropdown menu, select "Discard".
- Click the "Save" button.
Method 3: Block mail using a regular expression
- Log in to your cPanel account.
- Click on the "Email" tab.
- Click on "Email Filters" under the "Email" section.
- Click on the "Add Filter" button.
- In the "Filter Name" field, enter a name for the filter (e.g., "Block spam using regex").
- In the "Pattern" field, enter a regular expression that matches the email addresses you want to block (e.g.,
@example\.com$
). - In the "Action" dropdown menu, select "Discard".
- 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.