Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

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

  1. HostUkrNic

    HostUkrNic Active Member

    Joined:
    Jan 26, 2009
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    51
    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:
    43,960
    Likes Received:
    1,821
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #2 cPanelMichael, Oct 28, 2013
    Last edited by a moderator: Nov 17, 2016
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice