06 Jan 2021

Blocking Accounts From Sending Emails – CPanel/WHM

Is it possible to block certain domains/accounts on my server for sending emails?

It’s possible to block certain domains from sending emails from server. There is an option in Exim configuration on your cPanel server to block domains from sending emails. This can be done by adding those domains into “/etc/blockeddomains” this configuration file.

Here I’m going to explain the steps to block accounts from sending emails. You must have a server with root access to do so.

The steps are explained below:

1. SSH to server as root.
2. Check the file “/etc/blockeddomains” is existing on the server. If it’s not there create one.
3. Add domains in “/etc/blockeddomains” to cut the email sending privilege.

You can use the following commands:

# echo "thedomain.com" > /etc/blockeddomains

Or, open “/etc/blockeddomains” with your favorite text editor and add/append the domain into it.

# vi /etc/blockeddomains
thedomain.com

4. Set correct ownership to “/etc/blockeddomains.”

# chown root.mail /etc/blockeddomains

5. Set correct permission.

# chmod 640 /etc/blockeddomains

6. Then log into the WHM panel and go to “EXIM Configuration Manager.”

WHM –> Service Configuration –> EXIM Configuration Manager –> Advanced Editor
Search for “Add additional configuration setting.” This can be located one by forth of the way of scroll down

Add the following entry:

domainlist blocked_domains = lsearch;/etc/blockeddomains

 

7. Search for “ROUTERSTART” and add the following entry:

reject_domains:

driver = redirect
domains = +blocked_domains
allow_fail
data = :fail: Connection rejected: SPAM source $domain is manually blacklisted.

This should be look like:

Yeah, that’s it!! Next time if you want to block another domain from sending emails, just add that domain into “/etc/blockeddomains” this file,

That’s it!!

19 Mar 2018

Installing and configuring ClamAV for cPanel server

WHM comes with a free, pre-installed version of clamavconnector (Clam antivirus) that is not activated by default.

Activate it by following this procedure:

  1. Connect to your WHM interface as root.
  2. On the home page, click on the cPanel link (icon).
  3. Click on “Manage Plugins”.
  4. Select the box “Install and keep updated” in the corresponding section to clamavconnector.
  5. Click on save at the bottom of the page to confirm the installation.

WHM will then download the necessary packages for clamavconnector and will install it automatically,  this may take a few minutes.

Once the installation has been completed, you will have a virus scan link in your cPanel interface.

Please go through the relevant screen captures:

clamav.png

clamav2.png

clamav3.png

That’s it !!!

©2021 Tranzmedia Netvision Limited. All Rights Reserved.
Top