Stopping Spam emails from being sent out

Gareth-AWD

Well-Known Member
Jul 3, 2008
195
13
68
London, UK
cPanel Access Level
Root Administrator
Every now and then our customers computers are hacked and their passwords used to send out Spam email.

Is there any methods to stop this? I heard somebody say that stopping Nobody emails will help, but doesn't that mean that PHP scripts that send emails will then not work.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

You mentioned that the home computers of the email users are hacked, but you also referenced PHP scripts. Could you elaborate on how the SPAM emails are sent out?

Thank you.
 

Gareth-AWD

Well-Known Member
Jul 3, 2008
195
13
68
London, UK
cPanel Access Level
Root Administrator
Some of my sites use PHP mail to send out things like enquiry forms and alerts. I'm concerned if I stop nobody emails, that my scripts will stop working for genuine email Alerts from PHP which are also nobody?

The emails are being sent out using pop3 or IMAP due to account details being found by viruses and hackers. So a hacked computer will have the username and password compromised. It happens about once a month, but we have about 400 accounts across 3 servers so quite rare.
 

cPanelPeter

Senior Technical Analyst
Staff member
Sep 23, 2013
586
25
153
cPanel Access Level
Root Administrator
Hello,

The php mail() function has a "5th parameter" which should be used. More information on how to use it can be found here.

You should also review the How To Prevent Email Abuse forum post.