My logrotate for maillog is as such
My intention is to have the log rotate and have an archive of 7days at anyone time. Also, each log file should be no more than 50MB before compress, so if in one day the log hits 100MB, I should have 2 logs per day and by the end of 7 days, I should have 14logs.
Is my above logrotate settings correctly set to achieve what I need? because currently my latest log file is 37MB and it didn't get compress, and the last log entry was 4am before it started on a new log...
1) my log was not compress after it started a new log. Is it because it didn't reach 50MB?
2) I understand the service/log restarts at 4am each day (hence the new log). Is it possible to control when this restart happens?
3) Will the above settings be able to achieve my intended objectives? 7 days log, each file no > 50MB, can have multiple logfiles each day (<50MB)