Disable email sending capability for a spamming account

euro-space

Member
Mar 24, 2014
11
0
1
cPanel Access Level
Root Administrator
Hi,

Executed SSH command:

whmapi1 suspend_outgoing_email user=cpusername

To disable sending emails for a cPanel account, which is sending out spam, but seems it doesn't work, as there's a lot of spam emails in the queue from that account.
Sample log line:
Code:
----

2016-11-22 05:57:34 1c945G-00065Y-PA <= [email protected] U=cpusername P=local S=1693 [email protected] T="Is your resume available?" for [email protected]
2016-11-22 05:57:34 cwd=/home2/cpusername/public_html/components/com_contact/models/forms 4 args: /usr/sbin/sendmail -t -i [email protected]

----
Username exists in /etc/outgoing_mail_suspended_users file

Any suggestion how to completely disable email service for the domain?

Thanks in advance.
 
Last edited by a moderator:

SysSachin

Well-Known Member
Aug 23, 2015
604
48
28
India
cPanel Access Level
Root Administrator
Twitter
Hi,
016-11-22 05:57:34 cwd=/home2/cpusername/public_html/components/com_contact/models/forms
The spam mail sending from above path using mail script. You have to disabled php mail function for the account by creating custom php.ini file
 

euro-space

Member
Mar 24, 2014
11
0
1
cPanel Access Level
Root Administrator
Thanks for the suggestion, yeah this is an alternative way, however it is also interesting why above cPAnel API command doesn't do its job. Any thoughts from cPanel staff please?

Cheers.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,225
463
Hello,

Could you let us know which PHP handler is configured on the system? Is "Prevent “nobody” from sending mail" enabled in "WHM >> Tweak Settings"?

Thank you.
 

danielpmc

Well-Known Member
Nov 3, 2016
78
33
18
usa
cPanel Access Level
Reseller Owner
Hello euro-space,

Is there a reason for keeping this account active? If you know it definitely is spam, why not delete the account before it gets your server IPs blacklisted? You owe nothing to an account holder who is proven to be, and repeatedly, negatively affecting others.

Just my opinion.