[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reading qmail Log File
On Monday 04 Apr 2005 15:38, Jeremy Hinton wrote:
> Harald Hanche-Olsen wrote:
> > + Bob Hutchinson <hutchlists@xxxxxxxxxxxx>:
> > | > For that reason, I interpose an extra process between the
> > | > tcp socket and qmail-smtp, which logs certain responses from
> > | > qmail-smtp:
> > | >
> > | > smtpd: pid 16927 250_ok_1112441572_qp_16929/
> > |
> > | hmmm nice, I don't suppose you'd have a patch handy for that?
> >
> > Not in the form of a patch, but I'll give you a do-it-yourself kit.
>
> Why not just use recordio to do the same? i log the qmail-queue pid,
> message envelopes, and other useful data this way with the following run
> scripts:
I do use recordio from time to time, but I don't like using it on busy
servers, except for short periods of time.
Harald's loggit program compiled fine, but does not like my heavily patched
qmail-smtpd, it stumbles on CHKUSER and tls and blocks the connection.
Probably works ok on vanilla qmail though, and it's an interesting bit of
code.
I suppose the answer is to pick up 'qp' in qmail-smtpd and make it spit it out
to the log there, but to be honest it's a bit beyond my C coding ability ATM.
But thanks all the same!
>
> /service/qmail-smtpd/run:
>
> #!/bin/bash
>
> ulimit -d 10000
>
> export QMAILQUEUE='/usr/local/bin/qmail-filter-chain'
> export HOST='pop.visi.net'
> CONLIMIT=100
>
> exec tcpserver \
> -c ${CONLIMIT} \
> -u201 -g200 -v -p -R -t 5 \
> -x /etc/tcprules.d/smtp.cdb \
> 0 smtp \
> /usr/bin/recordio \
> /var/qmail/bin/qmail-smtpd \
> smtp.visi.net \
> /usr/local/bin/checkpw-pop3 \
> /bin/true \
> 2>&1
>
>
>
> /service/qmail-smtpd/log/run:
>
> #!/bin/sh
> #
> # Standard demontools logger
> # ===
>
> PROG=qmail-smtpd
>
> exec \
> setuidgid qmaill \
> multilog \
> t s10485760 \
> '-* * > *' \
> '-* * < *' \
> '+* * > 5*' \
> '+* * > 4*' \
> '+* * > 250 ok * qp *' \
> '+* * < RCPT *' \
> '+* * < RSET *' \
> '+* * < MAIL *' \
> '+* * < AUTH *' \
> /var/multilog/${PROG}
>
> - jeremy
--
-----------------
Bob Hutchinson
Midwales dot com
-----------------