Hi,
Is it possible to block account on my cpanel server for sending emails?
Block account from Sending Mails on Cpanel Server
Moderator: Staff
cPanel Server Management
@ 30$ Onwards
@ 30$ Onwards
Re: Block account from Sending Mails on Cpanel Server
Hi,
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
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
Re: Block account from Sending Mails on Cpanel Server
Hello,
The steps are explained below:
1. SSH to server as root user.
2. Check the file “/etc/blockeddomains” is existing on the server. If it’s not there create one.
# touch /etc/blockeddomains
3. Add domains in “/etc/blockeddomains” to cut the email sending privilege.
echo “thedomain.com” > /etc/blockeddomains
Or else, open the file “/etc/blockeddomains” with your favorite text editor and add/append the domain into it.
# vi /etc/blockeddomains
thedomain.com
The ownership of the file is to be set as root.mail
# chown root.mail /etc/blockeddomains
Set the permission as 640
# chmod 640 /etc/blockeddomains
There are a few more steps to be done to have this working. Once the above steps are done, log into the WHM panel and go to “EXIM Configuration Manager.”
WHM –> Service Configuration –> EXIM Configuration Manager –> Advanced Editor
Search for the string“Add additional configuration setting.”
Add the following entry:
domainlist blocked_domains = lsearch;/etc/blockeddomains
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.
Brandon N
Linux Support Engineer.
Nixtree Solutions
Managed Full Server Backups
https://www.nixtree.com/managed-backups.php
Follow us on : https://twitter.com/nixtree
Do you need professional help with this? Please open a support ticket to support@nixtree.com we'll fix it for you!
The steps are explained below:
1. SSH to server as root user.
2. Check the file “/etc/blockeddomains” is existing on the server. If it’s not there create one.
# touch /etc/blockeddomains
3. Add domains in “/etc/blockeddomains” to cut the email sending privilege.
echo “thedomain.com” > /etc/blockeddomains
Or else, open the file “/etc/blockeddomains” with your favorite text editor and add/append the domain into it.
# vi /etc/blockeddomains
thedomain.com
The ownership of the file is to be set as root.mail
# chown root.mail /etc/blockeddomains
Set the permission as 640
# chmod 640 /etc/blockeddomains
There are a few more steps to be done to have this working. Once the above steps are done, log into the WHM panel and go to “EXIM Configuration Manager.”
WHM –> Service Configuration –> EXIM Configuration Manager –> Advanced Editor
Search for the string“Add additional configuration setting.”
Add the following entry:
domainlist blocked_domains = lsearch;/etc/blockeddomains
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.
Brandon N
Linux Support Engineer.
Nixtree Solutions
Managed Full Server Backups
https://www.nixtree.com/managed-backups.php
Follow us on : https://twitter.com/nixtree
Do you need professional help with this? Please open a support ticket to support@nixtree.com we'll fix it for you!