The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'E-mail Discussions' started by HostUkrNic, Oct 28, 2013.

  1. HostUkrNic

    HostUkrNic Active Member

    Joined:
    Jan 26, 2009
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    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      = 'test@mail.com'; 
    $subject = 'The test for php mail function'; 
    $message = 'Hello'; 
    $headers = 'From: test@test.com' . "\r\n" . 
        'Reply-To: test@test.com' . "\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
     
    #1 HostUkrNic, Oct 28, 2013
    Last edited: Oct 28, 2013
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    #2 cPanelMichael, Oct 28, 2013
    Last edited by a moderator: Nov 17, 2016
Loading...

Share This Page