Hi

You can use the s (size) and n (number of files) options as described here:

http://cr.yp.to/daemontools/multilog.html

Besides, keep in mind how qmail works: every log message is printed to stdout and piped to /service/WHATEVER/log/run's stdin, which usually runs multilog. But you can replace it with any other program, as long as it can read its input from stdin. You could easily code a script that reads from stdin and inserts every log line on a DB, if that's what you want.

For example, at a company I worked at our /service/qmail-smtpd/log/run file looked like this:

#!/bin/sh
setuidgid qmaill \
envdir ./env \
sh -c '
    exec /usr/bin/funnel \| \
    "| /var/qmail/bin/splogger smtpd 17" | \
    multilog \
        t \
        ${MAXFILESIZE+"s$MAXFILESIZE"} \
        ${MAXLOGFILES+"n$MAXLOGFILES"} \
        ${PROCESSOR+"!$PROCESSOR"} \
        /var/qmail/log/qmail-smtpd
'

By using funnel we sent qmail's output to two logger programs: multilog AND splogger. Multilog did local logs, and was easily setup with the env/MAXFILESIZE, MAXLOGFILES and PROCESSOR files; and splogger was configured to send a copy of every log line to a central syslog server (our mail system was a cluster of seven).

Hope that helps

Regards

El 11/11/2008, a las 13:13, Jimmy Spam escribió:

How work and how I can configure multilog? I can't found many info about it.

At this moment, my qmail-logs are rotated when it's weight is about 16775250bytes.

with this size i can store logs during 1 month aprox.

I'm thinking from many time ago about the posibility of store all log (or a copied of them) of all components of my server (qmail- smtpd, qmail-scanner, kav...) in a DB as mysql or postgre, for can do queries easily from many manners. what do you think about this? experience? advices?

--
  Vicente Aguilar <[EMAIL PROTECTED]> | http://www.bisente.com

Reply via email to