PHP mail() function is disabled, yet script can send out e-mails
I have "Prevent "nobody" from sending mail" set to On, but e-mail is sent out despite php file with code
echo 'disable_functions: ' . ini_get('disable_functions') . "
";
shows that "mail" is within disabled functions. I set it to disabled by adding following to the end of /usr/local/lib/php.ini [PATH=/home/mycpanelnamehere/public_html] disable_functions = "show_source, system, passthru, shell_exec, popen, proc_open, allow_url_fopen, mail"
the mailing script is at /home/mycpanelnamehere/public_html/subdomain/name/dir/scriptname.php The sender is mycpanelnamehere@myserverhostname.tld[/EMAIL] Not sure why? Can i modify that cpanel and set its mailing limit to 0?
";
shows that "mail" is within disabled functions. I set it to disabled by adding following to the end of /usr/local/lib/php.ini [PATH=/home/mycpanelnamehere/public_html] disable_functions = "show_source, system, passthru, shell_exec, popen, proc_open, allow_url_fopen, mail"
the mailing script is at /home/mycpanelnamehere/public_html/subdomain/name/dir/scriptname.php The sender is mycpanelnamehere@myserverhostname.tld[/EMAIL] Not sure why? Can i modify that cpanel and set its mailing limit to 0?
-
Hello, Could you let us know which PHP handler is configured for the account, and if the system uses EasyApache 3, or EasyApache 4? Thank you. 0 -
Can you post the exim log entries for those mails? I had a similar sounding issue, which I mentioned here: Outgoing Email Abuse from localhost 0 -
@cPanelMichael PHP handler is SuPHP EasyApache 3 is used. @ruzbehraja here is those log entries from exim_mainlog 2016-11-30 17:54:33 1cC95L-0007gt-10 Completed 2016-11-30 17:55:01 cwd=/ 2 args: exim -bpc 2016-11-30 17:55:08 cwd=/ 2 args: /usr/sbin/exim -bpu 2016-11-30 17:55:09 SMTP connection from [127.0.0.1]:55105 (TCP/IP connection count = 1) 2016-11-30 17:55:09 SMTP connection from (localhost) [127.0.0.1]:55105 closed by QUIT 2016-11-30 17:55:10 cwd=/home/cpanelnamehere**editted**/public_html/_sub/**editted** 3 args: /usr/sbin/sendmail -t -i 2016-11-30 17:55:10 1cC966-00082w-JW <= cpanelnamehere**editted**@host**editted**.com U=cpanelnamehere**editted** P=local S=524 T="hello" for **editted**@gmail.com 2016-11-30 17:55:10 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1cC966-00082w-JW 2016-11-30 17:55:11 1cC966-00082w-JW From: header (rewritten was: [**editted**@hotmail.com], actual sender is not the same syst em user) original=[**editted**@hotmail.com] actual_sender=[cpanelnamehere**editted**@host**editted**.com] 2016-11-30 17:55:11 1cC966-00082w-JW SMTP connection outbound 1480528511 1cC966-00082w-JW cpaneldomain**editted**.net **editted**@gmail.com 2016-11-30 17:55:11 1cC966-00082w-JW => **editted**@gmail.com R=lookuphost T=remote_smtp H=gmail-smtp-in.l.google.com [173.194. 219.26] X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=yes C="250 2.0.0 OK 1480528511 j13si17996826ywi.100 - gsmtp" 2016-11-30 17:55:11 1cC966-00082w-JW Completed
thank you0 -
PHP handler is SuPHP
Hello, With suPHP, the PHP processes arn't run as the nobody user, so the "Prevent "nobody" from sending mail" option would not apply in this case. Also, could you verify if any custom php.ini files exist within the affected account? Thank you.0 -
php.ini is not anywhere within /home/CpanelAccountName/ or its subdirectories. no .htaccess file contains phrasse "mail" 0 -
php.ini is not anywhere within /home/CpanelAccountName/ or its subdirectories. no .htaccess file contains phrasse "mail"
Could you open a support ticket using the link in my signature so we can take a closer look? 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
6 comments