Exclude cPanel Account From Sending Emails

creemhost

Registered
Nov 20, 2020
4
1
3
Pakistan
cPanel Access Level
Root Administrator
Hi everyone, I want to exclude 1 cPanel account from sending emails, I mean if anyone sending spam emails etc can we disable email sending for that cPanel account/username.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,850
433
438
Finland
cPanel Access Level
Root Administrator
Is the spam sent from the server in question, or is it sent from outside of the server?
 

creemhost

Registered
Nov 20, 2020
4
1
3
Pakistan
cPanel Access Level
Root Administrator
Actually I want to disable email sending from 1 account because I'm using email service and he sending 2K+ daily emails thats why I want to disable email sending on his account.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,850
433
438
Finland
cPanel Access Level
Root Administrator

ServerHealers

Well-Known Member
Sep 21, 2015
100
57
78
India
cPanel Access Level
Root Administrator
Yes as mentioned by @quietFinn, It is something easy to do via WHM API. Login to your server as root and execute the following.

whmapi1 suspend_outgoing_email user=example

The above will suspend the outgoing email facility if the mentioned user. You can also use "hold_outgoing_email" to hold the emails in the email queue instead of rejecting them.
 
  • Like
Reactions: cPanelAnthony