Reputation: 185
I currently have a WHM / cPanel server, and a particular user keeps having their WordPress compromised and used to send out spam. I am looking to disable the ability for this one account to send email out via PHP.
After looking around, I saw recommendations to go into WHM -> Tweak Settings -> Disable "nobody" from sending mail
, however that doesn't help me as I am using suPHP.
The other recommendation was to manually add disabled_functions = mail
to the php.ini
file, but of course that would block all users from being able to send mail.
Is anyone able to recommend a way of doing this, either within php.ini
or WHM / cPanel itself? Thanks!
Upvotes: 0
Views: 17434
Reputation: 7211
i suggest you to disable php mail function as: mail, sendmail
by WHM => PHP Configuration Editor =>Advanced Mode => disable_functions
Now after that enable by php.ini on only that account who are trusted and other will be auto disabled by default. i hope this will be better.
Upvotes: 0
Reputation: 2540
You can create the separate php.ini file for your user and disable the mail function in that php.ini file,
Upvotes: 1