Internet Mail System 総合スレ@UNIX板

このエントリーをはてなブックマークに追加
163まあ、こんぐらいよんどけってこった。
・ newQmail-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
$@

>>156 は日本語しか読めない馬鹿だったということですね. :-)
QUIT なしでセッションを切断したときはログを残してほしいものだが。
他にも LIST/STAT で嘘のバイト数を返すし、TOP で要求した行数を返さないし、
qmail-pop3d は RFC に準拠した pop サーバとは言えんと思う。