Skip to main content

Preventing sendmail

Comments

11 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
  • ssambhi
    Thanks. Where is the php.ini file that is used by the whole server? Or does this php.ini file need to be uploaded to each cpanel folder? Sorry, not an expert in this area. Thanks in advance.
    0
  • 24x7server
    Hello, If you want to disable this php mail function for all user than you will have to update your server php.ini (/usr/local/lib/php.ini)
    0
  • malioml
    Hello, In cpanel u can modify php.ini by searching "PHP Configuration Editor". i have the same question and cPanelMichael"s answer is uncompleted because if u disable mail() function in php.ini, u can still send unauthenticated mail through phpmailer setting $mail->SMTPAuth = false; Also, i have perl files that use sendmail unauthenticated and i could send with mail() disabled. thanks and sorry for my english.
    0
  • cPanelMichael
    The following post should be useful if you want to block all email for a domain name, not just sendmail: Block one domain from sending email Thank you.
    0
  • ssambhi
    OK, so I have set up limits in both "Tweak Settings" and "Packages" and "List Accounts" limiting each account to 20 emails per domain. However, a rogue script is able to send email (it's a PHP script on the server). I have also tested my own script on my personal account, and it's also able to send as many emails as it wants through PHP. How do I limit PHP? See attached sample, it's the cPanel or root account in every case that's getting around the limits. HELP! .vB
    0
  • cPanelMichael
    Did you disable the "Mail" function for PHP as referenced earlier in this thread? Thank you.
    0
  • ssambhi
    I can't do that because then my Drupal websites are unable to send email. I've tried a few variations of entries into php.ini and all of them cripple Drupal, even if configure to use SMTP. I don't understand why cPanel's setting of the Limit emails per domain per hour have no effect on email sent by PHPmail. Where is the setting to reduce that hourly send limit?
    0
  • cPanelMichael
    ] I don't understand why cPanel's setting of the Limit emails per domain per hour have no effect on email sent by PHPmail. Where is the setting to reduce that hourly send limit?

    What PHP handler are you using? Thank you.
    0
  • ssambhi
    IT's set to use suPHP
    0
  • cPanelMichael
    Feel free to open a support ticket so we can take a closer look if the mail limiting feature is not working. You can post the ticket number here so we can update this thread with the outcome. Thank you.
    0

Please sign in to leave a comment.