Re: popサーバのログは何処に
MAEDA Atusi <maeda-news@ialab.cs.tsukuba.ac.jp> writes:
> qmail-popupやqmail-pop3dは何のログも出しません。
http://www.qmail.org/top.html に login したユーザなどをログに残す方法が
紹介されています。
| ・ Qmail-popup redirects stderr to stdout, thus making it impossible to write
| a wrapper around qmail-pop3d which writes to the logfile by writing to
| stderr. Being a little cleverer with the shell, you can also redirect FD 7
| onto stdout like this:
|
| /var/qmail/bin/qmail-pop3d-wrapper.sh /var/qmail/bin/qmail-pop3d Maildir 2>&1 7>&1
|
| Once you've done that, qmail-pop3d-wrapper.sh can log to FD 7, like this:
|
| #!/bin/sh
| echo "qmail-pop3d: user $USER logged in from $TCPREMOTEIP:$TCPREMOTEPORT" >&7
| $@
--
Hiroshi Fujishima
Fnews-brouse 1.9(20180406) -- by Mizuno, MWE <mwe@ccsf.jp>
GnuPG Key ID = ECC8A735
GnuPG Key fingerprint = 9BE6 B9E9 55A5 A499 CD51 946E 9BDC 7870 ECC8 A735