Increase Logs Archiving Duration
I want to increase exim logs archiving during up to 5 Years. What changes need in "/etc/logrotate.d/exim"
-
Here's my exim file. It rotates every 90 days, compresses daily (I have scripts that search these automatically), and stores the files in a separate directory: /var/log/exim_mainlog { daily rotate 90 olddir /var/log/exim/messages create 0640 mailnull mail compress postrotate /usr/bin/killall -HUP exim endscript } /var/log/exim_paniclog { daily rotate 90 olddir /var/log/exim/panics missingok create 0640 mailnull mail compress postrotate /usr/bin/killall -HUP exim endscript } /var/log/exim_rejectlog { daily rotate 90 olddir /var/log/exim/rejects create 0640 mailnull mail compress postrotate /usr/bin/killall -HUP exim endscript }
You'd want to change thatrotate 90
torotate 1825
I'd definitely recommend placing them somewhere other than /var/log, as /var/ is likely not going to be able to handle 5 years of data.0 -
Also, you might want to take a look at this 3rd party site linuxconfig.org/logrotate. It'll help you understand what all that does ;) 0 -
Thanks. I have done it: /var/log/exim_mainlog { create 0640 mailnull mail compress rotate 262 postrotate /usr/bin/killall -HUP exim endscript }0 -
Hello, Yes, as mentioned, you may encounter disk space availability issues should you decide to keep the log archives for an extended period of time. Ensure you review the available disk space on the system on a regular basis if the size of the drive/partition is small. Thank you. 0 -
disk space doesn't matter, i have alot of free space. Moreover let me know how can i increase dovecot log archiving such as `/var/log/maillog` 0 -
disk space doesn't matter, i have alot of free space. Moreover let me know how can i increase dovecot log archiving such as `/var/log/maillog`
You can use the same method that was explained for /var/log/exim_mainlog for the /var/log/maillog file using LogRotate. It's grouped with other system log files by default in:/etc/logrotate.d/syslog
You could remove the entry from that file and create a new one for /var/log/maillog exclusively, using the template from other files in the /etc/logrotate.d/ directory. Thank you.0
Please sign in to leave a comment.
Comments
6 comments