Stop my VPS server from spamming?

Hi,
I have a VPS server and one of my accounts has been compromised.
I am still trying to find the code that allows for upload of these spamming files but for now I have just terminated the account on the server.

Just wondering if there is a setting I can change in WHM/CPANEL that will stop emails being sent with fake headers, perhaps only allowing headers from account on my VPS?

mail() on [/home/mywebsite/public_html/mail.php(586) : eval()'d code(2) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code:185]: To: random_email@yahoo.com.au -- Headers: From: Apple Inc <secure@service.com>  MIME-Version: 1.0  Content-Type: text/html

Thanks.
sabecsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gheistCommented:
remove or deny access to vulnerable form.
SandyCommented:
Install csf/lsf immediately and also check with number of mails can be sent during per minute under tweak setting of WHM.

also disable the SSH shell access (if not needed) for the users, because it is quiet common to install rootkit using SSH under CPANEL/WHM.

TY/SA

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.