[Solved] How to control mail spam in WHM / cPanel
If you are facing problem that a user’s code is sending tons of spam mails and you can’t suspend that user or don’t wish to do same, here is the solution.
You can simply suspend the outgoing email facility of that particular user (it won’t create log entries in your mail queue too)
Connect to your server as root user and run the following command :
whmapi1 suspend_outgoing_email user=example
The output will be like :
This will suspend the user outgoing email facility and won’t increase the load of server due to email spam.
You can unsuspend the same by replacing the suspend to unsuspend in the given command.