I've solved qith this workaround.

You need the package logrotate
(ftp://ftp.pbone.net/mirror/ftp.centos.org/4.6/os/i386/CentOS/RPMS/logrotate-3.7.1-6.RHEL4.i386.rpm)
For example the SMTP logs (you can apply this solution to all logs).

# service qmail stop
# cd /tmp
# wget
ftp://ftp.pbone.net/mirror/ftp.centos.org/4.6/os/i386/CentOS/RPMS/logrotate-3.7.1-6.RHEL4.i386.rpm
# rpm -Uvh logrotate-3.7.1-6.RHEL4.i386.rpm
...
# sed -e 's/t s$LOGSIZE n$LOGCOUNT/t/g'
/var/qmail/supervise/smtp/log/run > /var/qmail/supervise/smtp/log/run.new
# mv /var/qmail/supervise/smtp/log/run
/var/qmail/supervise/smtp/log/run.orig
# mv /var/qmail/supervise/smtp/log/run.new /var/qmail/supervise/smtp/log/run
# chown qmaill.qmail /var/qmail/supervise/smtp/log/run*
# chmod 0755 /var/qmail/supervise/smtp/log/run*
# cat<<EOF>>/etc/logrotate.conf
>/var/log/qmail/smtp/current {
>daily
>rotate 15
>compress
>copytruncate
>}
>EOF
# chmod 644 /etc/logrotate.conf
# echo "0 0 * * * /usr/sbin/logrotate /etc/logrotate.conf" >>
/var/spool/cron/root
# chmod 600 /var/spool/cron/root
# service crond restart
# service qmail start

And that's all.

Bye,
Alex.

Il 06/11/2008 16.47 Eric Shubert scriveva:
> slamp slamp wrote:
>> is there a way to rotate the multilogs daily? i see it for size but
>> not for daily.
>>
>
> Not that I'm aware of.
>

Reply via email to