On Tue, 18 Jan 2011 21:34:00 +0100
Robert Schetterer <rob...@schetterer.org> articulated:

> Am 18.01.2011 20:50, schrieb Mark Alan:
> > On Tue, 18 Jan 2011 11:53:17 +0200, Timo Sirainen <t...@iki.fi>
> > wrote:
> >> Be sure to send a SIGUSR1 signal to dovecot process too so that it
> >> reopens the logs. (With v2.0 you can use doveadm log reopen.)
> > 
> > Would this do?
> > 
> > /var/log/dovecot.log {
> >   weekly
> >   rotate 4
> >   create 600 root root
> >   size 64k
> >   compress
> >   notifempty
> >   postrotate
> >     [ -f /var/run/dovecot/master.pid ] && kill -USR1
> > $(cat /var/run/dovecot/master.pid) endscript
> > }
> > 
> > 
> > M.
> 
> be aware that new /var/log/dovecot.log after rotate is writable to the
> dovecot user
> after all i would use daily
> 
> logrotate differs a little bit from distro to distro
> 
> simply try it
> 
> logrotate --help
> Usage: logrotate [OPTION...] <configfile>
>   -d, --debug               Don't do anything, just test (implies -v)
>   -f, --force               Force file rotation
>   -m, --mail=command        Command to send mail (instead of
> `/usr/bin/mail')
>   -s, --state=statefile     Path of state file
>   -v, --verbose             Display messages during rotation
> 
> so i.e
> 
>  logrotate -f -v /etc/logrotate.d/dovecot
> will help to test
> 
> and/or
> 
> look
> http://wiki.dovecot.org/Logging

The following works fine on a FreeBSD system (/etc/newsyslog.conf)

# logfilename          [owner:group]    mode count size when  flags [/pid_file] 
[sig_num]
/var/log/dovecot.log    vmail:vmail     664  1     *    $M1D0 CJ    
/var/run/dovecot/master.pid 30


$M1D0   rotate at the first day of every month at midnight (i.e., the start of 
the day; same as @01T00)


-- 
Jerry ✌
dovecot.u...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________
“The very powerful and the very stupid have one thing in common.
Instead of altering their views to fit the facts, they alter the facts
to fit their views...which can be very uncomfortable if you happen to
be one of the facts that needs altering.”

Reply via email to