From: Carlos E. R. <rob...@te...> - 2016-09-25 09:32:49
|
On 2016-09-25 04:08, Chris wrote: > On Sun, 2016-09-25 at 03:24 +0200, Carlos E. R. wrote: > I can just have procmail log to syslog also. I was attempting to use > webmins logrotate setup yesterday but couldn't get it to where it would > kill the fetchmail process, rotate and recreate the log then restart > fetchmail. If you use "logrotate" it is quite simple, actually. It is a directory "/etc/logrotate.d" with config files. Take the one for apache, it contains entries for each file it handles: var/log/apache2/access_log { compress dateext maxage 365 rotate 99 size=+4096k notifempty missingok create 644 root root postrotate /usr/bin/systemctl reload apache2.service endscript } The "postrotate" is what it does with the process. I see one file for fetchmail, too: var/log/fetchmail { compress dateext maxage 365 rotate 99 size=+1024k notifempty missingok copytruncate create 0600 fetchmail root } It doesn't kill the service. Instead it copies and trunctates the log. This is in openSUSE, other distros may vary. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar) |