How to block email from domain or country in cpanel?

Why email security is important?


To access the service of email or any personal account as well as to secure the information in emails, you must have trust in email security applications. The first-ever step taken by the cPanel to block emails if you found something wrong in a domain or country emails. As expected, it will block spam emails whereas a spammer used to send emails in bulk from messaging systems. Terrifically, it will create more and more problems to stop our entire works. Don’t ever give away for the spammers to sit in your inbox. Just go wide for cPanel blocking feature to freeze them in one point.

Predict the mail filter role:

For better handling of messages in email, you must work on email filter configuration. There are two types of email filters in cPanel such as global email filter and basic alias user-level email filters.

  • Global email filters: It will be very useful for setting up the accounts in cPanel which also act as an interface. Go to cPanel and then choose home. Check for the option email so that you can access Global email filters. The proficiency of rule is allowed to access cPanel accounts.
filter1.png

  • User-level email filters: This user-level email filter is also an interface which sets the rule for the address of the emails specifically. Go to cPanel and then home. Choose email from home option at last select email filters.
SpamAssassin Report_Safe Option Apache Configuration:

Each system does spam examination! If any of the spam messages gets failed, Apache SpamAssassin takes the responsibility to give alert for Apache SpamAssassin Report_Safe option. The recommended step is followed in a file called “global configuration” as mentioned in the pathway ‘/etc/mail/SpamAssassin/local.cf’.

How to enable settings of Old-Style Spam System?

In versions like WHM 54 and cPanel, you cannot see the option “Old-Style Spam System”. But it is available in version 11.52 so that it is easy to enable the settings. At the same time, Exim doesn’t help you to make changes in file “Global configuration”.

Step 1: Now, log in as root user in WHM. Check for the option “Service Configuration”. From that, choose the interface “Exim configuration manager”.
exim.png


Step 2: You will be displayed with many tabs. Choose “Apache SpamAssassin” to enable Old-Style Spam Setting.
filter2.png


Step 3: Save changes by tapping on the button Save.

Enable Apache SpamAssassin in Global configuration file:

Go to the path ‘/etc/mail/SpamAssassin/local.cf’ to make changes in Report_Safe. It asks you to enter the values like 0, 1, and 2.

Here’s the description of 0, 1, and 2:

  • 0 – The header of the email shows the spam messages which has a flawless message body.
  • 1 – Spam email is suspected. The document has a set of offense spam rule. (Body of the emails shows the spam rule)
  • 2 – Spam email is suspected. The file has a set of offense spam rule.
Blocking Domain or Country emails:

As said before, cPanel has the new methodology to block spam emails from domain or country. Let's see how to block the spam emails:

Filter country prospective incoming email:

Step 1:
As the root user, log in to WHM. Tap on the option “Email” it shows the list of menus. Choose Filter incoming emails by country. You can use this interface for allowing emails from your choice of the country so that it blocks remaining countries.
filter3.png


Step 2: Go to the table of country select allowed toggle to disable emails from other countries.

Further, you can block or permit countries by below steps:

Step 1:
Check the interface top on the left side to select the checkbox called “select all”.

Step 2: To give authorities of selected countries, tap on the option allow selected.

Or else

To block the selected countries, tap on the option “block selected”.

Filter domain perspective incoming emails:

Step 1:
You are the root user, log in to WHM to select the section “Email”. Choose the option “Filter incoming emails by domain”.

This helps you to block the emails from the specific domain. It just checks the “from” address to match the blocked domain as specified by you. If it matches simply rejects the email from the blocked domains.

We’ll help you to give some hints to block emails for a specific domain:

Step 1:
Go to the text box called “blocked domains” to block the domains. If you are in a situation to block many domains just add a new line. A new line must be added to all domain for blocking more and more domains.

Step 2: Save the changes.

We have blocked spam emails from domain or country by following above-mentioned details. It takes less than 5 minutes to process all. So, it’s a new method of cPanel invention right? Give hope in all situations!
Author
bhawanisingh
Views
5,122
First release
Last update
Rating
0.00 star(s) 0 ratings
Top