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!

php.ini and mail.log file size limit

Discussion in 'General Discussion' started by dzamanakos, Jan 12, 2016.

  1. dzamanakos

    dzamanakos Active Member

    Feb 15, 2014
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hi, in order to track scripts that are sending emails through php mail() function, i've read about mail.log directive in php.ini that accepts either a user's home dir file or a path to a server, for example /var/log/php_mail.log

    I'm using suphp so in order to write to a /var/log/php_mail.log i have to set 777 permissions to the file, if i want to have all my users logs to one file. It isn't a good idea for me to use a 777 file.

    The other solution is to use a file like the error_log, inside the users home dir but the problem is that i didnt find any documentation about limiting the file size, so after a while the user's home dir will be over quota.

    Is there a way to limit the file size through php.ini?
    Or any other way to monitor mail() in a file containing all users, but not chmod to 777?

    Thank you,
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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