On May 9, 2020, at 9:45 AM, Wietse Venema <wie...@porcupine.org> wrote:
If the log is written by Postfix you must use "postfix logrotate".
This ensures that Postfix stops writing to a file before it is
compressed.
Wietse--
I hate to even suggest I found a bug with Postfix, but I think I found a very minor bug.
First, despite having gone to Postfix logging over a year ago (thanks to MacOS’s weird logging system), this is the first I heard there was a Postfix logrotate command. Testing it, I did not get the rotated file name I would have expected. The bug is the default name for the rotated file which is from the parameter maillog_file_rotate_suffix:
# postconf -d maillog_file_rotate_suffix
maillog_file_rotate_suffix = %Y%M%d-%H%M%S
This is putting minutes where month should be. And it’s documented that way at http://www.postfix.org/MAILLOG_README.html (so technically not a bug since it works as documented but not as one would expect).
Easy fix with an override in main.cf
Larry Stone
lston...@stonejongleux.com
%M - minute
%m - month.
you have a typo, should be:
maillog_file_rotate_suffix = %Y%m%d-%H%M%S
09.05.2020, 11:32, "Larry Stone" <lston...@stonejongleux.com>:
- logrotate script for Postfix Fourhundred Thecat
- Re: logrotate script for Postfix Nick
- Re: logrotate script for Postfix Wietse Venema
- Re: logrotate script for Postfix Larry Stone
- Re: logrotate script for Postfix sashk
- Minor logrotate bug (was Re: logrotate scr... Larry Stone
- Re: Minor logrotate bug (was Re: logro... Wietse Venema