A week ago one of our clients account been compromised and the attacker used the server to blast emails. as a system administrator my task was to prevent any outgoing email from the account before I start to investigate the attack and remove any kind of scripts from the hosting account. Studying cPanel files made me to come around following solution.
To disable email for one account we can change the permission of /etc directory for that particular user, using our root power.
simply use following commands:
chmod 0 /home/username/etc chattr +ia /home/username/etc
You need to replace username with your user username. Once this is done the user will not be able to send anymore emails from local server. To undo this you should run the chattr once more:
chattr -ia /home/username/etc chmod 750 /home/username/etc
That’s it, Stay safe… out of spam!
Incoming search terms:
- mail taijin net
- cPanel disable email
- panel mail
- mahdi mail
- disable email account in cpanel
- cpanel disable single email account
- how to diable email account in cpanel
- disable email in cpanel
- cpanel turn off email
- how to disable email accounts in cpanel
nice solution to suspend an account email capability!
Will this only block outgoing mail, or will it also prevent the user to receive e-mails?
it completely disable the local mail processing for user. both send and receive.
Hi, pardon my ignorance, but how do I run the commands above?
for recent cPanel version, the path is /home/username/mail/
thanks for the update. hope it helps other users.
Leave a comment