Rotate Exim logs daily
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.
-
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 -
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.
Comments
2 comments