Re: logrotate configuration



Hi,

On you system, you should have a file named /etc/logrotate.conf and a directory /etc/logrotate.d

to rotate mail every day and keep 7 days of history

create /etc/logrotate.d/mail

root# cat /etc/logrotate.d/mail
#compress rotated files with gzip
compress
/var/mail {
#rotate daily
daily
#keep 7 days of history
rotate 7
#put all rotated mail boxes under /var/mail/archives
olddir /var/mail/archives
#append to rotated mail boxes file name .yyyymmdd
dateext
}
root# mkdir /var/mail/archives

put in the root crontab:
0 0 * * * /usr/sbin/logrotate /etc/logrotate.d/mail
if you just want to rotate mail boxes or
0 0 * * * /usr/sbin/logrotate /etc/logrotate.conf
to rotate all logs and stuffs defined under /etc/logrotate.d


Marc La Senne
Office Automation Unix
Amadeus S.A.S.
+33.(0)4.97.15.44.59
gesuina wrote:
I am not able to manage logrotate.
For example, how could I make it to rotate mail log files every day
(independently from size, or other things)?
Thank you


.