I want to logrotate /var/log/mail.log in a special way.
crontab looks like this...
So every morning at 6:25AM the daily will run.
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
I have edited /etc/logrotate.conf to look like this..
What I am trying to do is keep 7 days worth of logs for mail log and to rotate the log daily, and start with the extension of .0
# system-specific logs may be configured here
However, I find this is not working. The log is not being rotated. Each morning I look after 6:25 has passed and I only see "mail.log" and it contains the logs for multiple days, and only keeps getting bigger.
What am I missing here.