Hello,
I have one user who is getting hacked a lot and the account is sending out spam emails. I want to disable just his account from being able to send mail at all until he can get his script updated or changed. Any way to do this?
Many thanks.
Hello,
I have one user who is getting hacked a lot and the account is sending out spam emails. I want to disable just his account from being able to send mail at all until he can get his script updated or changed. Any way to do this?
Many thanks.
You can try the following steps. First, in root SSH, run these commands:
Please replace domain.com with the domain name. Do not replace the "" part as that's required, only the domain.com part with the right domain name.Code:touch /etc/blockeddomains echo "domain.com" >> /etc/blockeddomains
In WHM > Exim Configuration Editor > Advanced Editor, put the following in the topmost box:
Locate the "ROUTERS CONFIGURATION" section, and right below these lines:Code:domainlist blocked_domains = lsearch;/etc/blockeddomains
Put the following lines:democheck:
driver = redirect
require_files = "+/etc/demouids"
condition = "${if eq {${lookup {$originator_uid} lsearch {/etc/demouids} {$value}}}{}{false}{true}}"
allow_fail
data = :fail: demo accounts are not permitted to relay email
Code:reject_domains: driver = redirect # RBL Blacklist incoming hosts domains = blocked_domains allow_fail data = :fail: Connection rejected: SPAM source $domain is manually blacklisted.
cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
-- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support
Submit a ticket | Check an existing ticket
Wow, talk about a fast response! It seems to be working so far. If I go to re-enable the banned domain is it recommended that I remove all of the things I just added? Or just remove it from the /etc/blockeddomains? Thanks very much.
You can always modify the account in WHM and change the outgoing mail limit to zero.
how can i do this but block all domains except ones i whitelist?
- cPanel :: Fantastico :: RVSkin :: WHM :: ModernBill
- Reseller Hosting :: SSL Certificates :: Domain Registrations :: Affiliate Program
- Blog Hosting :: CMS Hosting :: Forum Hosting :: E-Commerce Hosting
SoftDux- The Leaders in Software
Use the coupon: cpanel-06 to get 20% off our packages
You could revise /etc/localdomains file to only have the whitelisted domains and place those other domains into /etc/remotedomains file, which would prevent those domains from being able to properly send. Any domain in /etc/remotedomains file will not be placed back into /etc/localdomains file.
cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
-- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support
Submit a ticket | Check an existing ticket
Hi,
I tried the ‘blocked_domians’ solution with the latest version of cPanel and it isn’t working. Has anything changed with respect to this solution in the latest version of cPanel? I’m simply trying to disallow my demo user from sending email.
How precisely is it not working? Is it PHP mail() or using sendmail, or it is sending via webmail and/or an email client? Are you receiving any type of error message or otherwise? Please provide as many details as possible. Thanks!
cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
-- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support
Submit a ticket | Check an existing ticket
Thanks for the quick response.
After implementing the ‘blocked_domains’ solution, I log into the demo account and then into webmail. From there I can send an email. There’s no errors. It just that I can send email from my demo account and so can spammers which is the problem I am trying to solve.
- cPanel :: Fantastico :: RVSkin :: WHM :: ModernBill
- Reseller Hosting :: SSL Certificates :: Domain Registrations :: Affiliate Program
- Blog Hosting :: CMS Hosting :: Forum Hosting :: E-Commerce Hosting
SoftDux- The Leaders in Software
Use the coupon: cpanel-06 to get 20% off our packages
Yes, it has changed to the point that the editor is more difficult to give easy instructions to follow. For example, the topmost box is no longer at the top but towards the middle now. I'll see what I can do.
cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
-- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support
Submit a ticket | Check an existing ticket
Tristan,
Just moved to 11.32.3.19 and wanted to confirm the steps we took to re-enable this directive.
Exim Advanced Editor > Section: CONFIG scroll down to "Add additional configuration setting".
In the form that appears add:Then scroll down to the Section: ROUTERSTART which is below the democheck entry and add:Code:domainlist blocked_domains = lsearch;/etc/blockeddomains
Just to double check, tail -f /var/log/exim_paniclog or if you're running CSF and have Log Scanner enabled from the command line run "/usr/sbin/csf --logrun" and check if any errors are reported.Code:reject_domains: driver = redirect # RBL Blacklist incoming hosts domains = blocked_domains allow_fail data = :fail: Connection rejected: SPAM source $domain is manually blacklisted.