Skip to main content

Rotate Exim logs daily

Comments

2 comments

  • vanessa
    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: /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.
    0
  • cPanelMichael
    The instructions in the previous post should work. Let us know the outcome or if you have any additional questions. Thank you.
    0

Please sign in to leave a comment.