Preventing sendmail
Hi all,
I'm trying to prevent PHP scripts from being able to send unauthenticated email through my server. I've read to change the following:
Tweak Settings:
Prevent "nobody" from sending mail [?] [ON]
However, when installing this test PHP file (see below, replaced email addresses with XXX), the email is still being sent. Any ideas?
Thanks in advance. [COLOR="silver">- - - Updated - - - Also worth noting I have set up a limit of 25 emails per domain, but i can send as many messages as i want through this script.
Thanks in advance. [COLOR="silver">- - - Updated - - - Also worth noting I have set up a limit of 25 emails per domain, but i can send as many messages as i want through this script.
-
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 -
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 -
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 -
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 -
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 -
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 -
Did you disable the "Mail" function for PHP as referenced earlier in this thread? Thank you. 0 -
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 -
] 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 -
IT's set to use suPHP 0 -
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.
Comments
11 comments