On Sat, Jan 15, 2005, F. Even wrote:
> >_When_ the logfile is rotated is usually not configurable. Its usually
> >done in the %daily section of rc.foo and this is by default at (luckily
> >you are ;-) midnight. For how long the logfiles are kept you can control
> >in <prefix>/etc/rc.conf by overriding he postfix_log_numfiles variable
> >from <prefix>/etc/rc.d/rc.postfix.
>
> OK...but I'm still having trouble figuring out HOW to do this. Right
> now, from what I can gather, it is configured to rotate the log when it
> hits 1MB:
>
> (from /cw/etc/rc.d/rc.postfix)
> %config
> MTA_name="postfix"
> MTA_aliases_file="/cw/etc/postfix/aliases"
> MTA_aliases_update="cd /cw/etc/postfix && /cw/sbin/postalias aliases"
> postfix_enable="$openpkg_rc_def"
> postfix_log_prolog="true"
> postfix_log_epilog="true"
> postfix_log_numfiles="10"
> postfix_log_minsize="1M"
> postfix_log_complevel="9"
> postfix_sum_flags=""
>
> I want something more along the lines of 20 logs, and I want them
> rotated daily.
>
> I see that the daily script runs from crontab @ midnight:
>
> [EMAIL PROTECTED]:/cw/etc/rc.d] grep daily /etc/crontab
> # do daily/weekly/monthly maintenance
> 59 1 * * * root periodic daily 2>&1 |
> sendmail root
> 0 0 * * * root [ -f /cw/etc/rc ] && /cw/etc/rc all daily
>
> ...but I still have not the foggiest clue what variables I should be
> looking at changing to get the postfix logs rotated daily. Is there a
> reference anywhere? Most of the variables above from rc.postfix, I'm
> not sure what they mean. About the only ones that are absolutely clear
> to me are postfix_log_numfiles and postfix_log_minsize, and I could be
> wrong on the minsize, but my guess is that means it will rotate the log
> when it hits a meg.
>
> If any of this is documented anywhere, point me to it. I'm having
> trouble figuring it out though and I can't find any obvious
> documentation. Worst case, I guess I can just start rotating them with
> FreeBSD's "newsyslog," but I'm trying to keep as much of opkg seperate
> from the rest (as designed by you guys).
Just add to your <prefix>/etc/rc.conf:
postfix_log_numfiles="20"
postfix_log_minsize=""
This way the logs should be rotated every night, independent of
the size and the last 20 logfiles are kept.
Ralf S. Engelschall
[EMAIL PROTECTED]
www.engelschall.com
______________________________________________________________________
The OpenPKG Project www.openpkg.org
User Communication List [email protected]