Skip to main content

stop email from local

Comments

5 comments

  • cPanelMichael
    Hello :) For PHP scripts, you could add "mail" to the disable_functions line in your PHP configuration file. The following document may also be helpful: How To Prevent Email Abuse Thank you.
    0
  • gavcom
    Hi i dont want to add MAIL to php there are alot of other sites legit that need it, i just want to stop a php from sending from my local server name eg x@localserver.co.za were x is the name of the account that has the php script loaded. i want them to send from x@x.co.za force-ably...
    0
  • cPanelMichael
    Hello, The default behavior of Exim is to use the cPanel username and hostname of the server to construct the envelope-sender address. If you can configure the mailer to use SMTP and authenticate with SMTP AUTH, this will set the correct "Return-Path" in the headers. There are no options to circumvent this unless you prevent users from sending out via PHP. You can add an individual php.ini to the account (assuming you are using suPHP) to ensure that only this account is blocked from sending out email through PHP, and that other accounts on your server are still permitted to do so. Thank you.
    0
  • gavcom
    1. hmm what if like the offending script they delete the php.ini and continue to send mail out 2. inside the php.ini i just put in exclude mail or do i have to have a complete php.ini 3. where do i put the php.ini /home/public_html ? or just /home thanks for the help
    0
  • cPanelMichael
    1. This topic is discussed here: Methods to Increase Security on suPHP - Restricting who can use php.ini files 2. I suggest making a copy of /usr/local/lib/php.ini and the adding "mail" to the disable_functions list within the copied file. 3. This is answered here: Where to place account php.ini file Thank you.
    0

Please sign in to leave a comment.