How disable php mail() to send an E-mail to stop spaming from server.

HostUkrNic

Active Member
Jan 26, 2009
28
2
53
How disable php mail() to send an E-mail to stop spaming from server.
I tried to add a setup exim:
Code:
acl_check_data:
deny
 authenticated	 = *
 condition = ${if or {{ !eqi{$authenticated_id} {$sender_address} }\
  { !eqi{$authenticated_id} {${address:$header_From:}} }\
 }\
 }
 message	 = Your FROM must be as the account you have authenticated with, your email is not delivered.
Adding the above settings does not work.
Also not helping:Server Configuration »Tweak Settings » Prevent “nobody” from sending mail - On
To test I use the following:
I created a test test.php:
Code:
<? 
$to      = '[email protected]'; 
$subject = 'The test for php mail function'; 
$message = 'Hello'; 
$headers = 'From: [email protected]' . "\r\n" . 
    'Reply-To: [email protected]' . "\r\n" . 
    'X-Mailer: PHP/' . phpversion(); 
mail($to, $subject, $message, $headers); 
?>
and put it in any account.
Help me please stop the spam uses php mail()
My configuration:
Code:
1Default PHP Version (.php files)	5
PHP 5 Handler	cgi
 	 
Apache suEXEC	on
Apache Ruid2	off
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Last edited by a moderator: