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!

Rotate Exim logs daily

Discussion in 'E-mail Discussion' started by rligg, Apr 21, 2014.

  1. rligg

    rligg Well-Known Member

    Joined:
    Sep 16, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    166
    I have searched and could not find what setting to use to rotate the exim logs daily.

    I know you are supposed to edit /etc/logrotate.d/exim

    Currently I have it set to Rotate 1 which is weekly. I am experiencing some huge logs due to an exim Syntax Attack. I have deployed some syntax rules in csf, but I want to play it safe until the attack subsides.
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    834
    Likes Received:
    28
    Trophy Points:
    178
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    The /etc/logrotate.conf defines the intervals for rotation, and RHEL/CentOS sets this to 'weekly' by default. You can change this value, but doing so will affect all rotation definitions in /etc/logrotate.d/. What you can try, though, is editing /etc/logrotate.d/exim and add 'daily' to the definitions:

    Code:
    /var/log/exim_mainlog {
        daily
        create 0640 mailnull mail
        compress
        postrotate
        /usr/bin/killall -HUP exim
        endscript
    }
    
    You can further add 'rotate X' to the same block to specify how many copies to keep. ie, 'rotate 7' should keep for up to 7 days.

    I haven't actually tried this outside of definitions in logrotate.conf, so do give it a try and let us know how it works out.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    The instructions in the previous post should work. Let us know the outcome or if you have any additional questions.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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