(解決)Re: popサーバのログは何処に
KMochidaです。
> pop3の方でもtcpserverに-vオプションを与えてみてはいかが?
> (smtpの方にだけついてますよ。)
#cat /etc/rc.d/init.d/qmail.sh
#!/bin/sh -x
#
# qmail: /var/qmail
PATH=/var/qmail/bin:/usr/local/bin:/bin:/usr/bin
[ -f /var/qmail/rc ] || exit 0
case "$1" in
start)
# Start daemons.
echo "Starting qmail."
csh -cf '/var/qmail/rc &'
#For SMTP
echo -n 'qmail-smtpd starting.'
QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
export QMAILQUEUE
QMAILDUID=`/usr/bin/id -u qmaild`
QMAILDGID=`/usr/bin/id -g qmaild`
/usr/local/bin/tcpserver -x /etc/tcpserver/smtpd_rules.cdb -v -u
$QMAILDUID -g $QMAILDGID \
0 smtp /var/qmail/bin/qmail-smtpd 2>&1 | /var/qmail/bin/splogger
smtpd 3 &
#For POP3
echo -n 'qmail-pop3d starting.'
/usr/local/bin/tcpserver -v -x /etc/tcpserver/pop3d_rules.cdb 0 \
pop-3 /var/qmail/bin/qmail-popup rh9.mine.nu /bin/checkpassword \
/var/qmail/bin/qmail-pop3d Maildir 2>&1 | /var/qmail/bin/splogger
pop3d 3 &
echo
touch /var/lock/qmail
ulimit -a
;;
stop)
# Stop daemons.
echo "Shutting down qmail."
PID=`/bin/ps -aefw | grep qmail | awk '{print $2}'`
if [ ! -z "$PID" ] ; then
/bin/kill ${PID} 1> /dev/null 2>&1
fi
echo
rm -f /var/lock/qmail
;;
*)
echo "Usage: S99qmail {start|stop}"
exit 1
esac
という風に-xオプションを
「/usr/local/bin/tcpserver -v -x /etc/tcpserver/pop3d_rules.cdb 0 \」
付けましたら
# tail -f /var/log/messages
Dec 1 00:07:54 rh9 smtpd: 1101827274.480085 tcpserver: ok 11559
rh9.mine.nu:192.168.0.1:25 upsil.rh9.mine.nu:192.168.0.89::4125
Dec 1 00:08:05 rh9 smtpd: 1101827285.374914 tcpserver: end 11559 status 0
Dec 1 00:08:05 rh9 smtpd: 1101827285.375307 tcpserver: status: 0/40
Dec 1 00:28:28 rh9 smtpd: 1101828508.981778 tcpserver: status: 0/40
Dec 1 00:28:29 rh9 pop3d: 1101828509.306878 tcpserver: status: 0/40
Dec 1 00:29:09 rh9 pop3d: 1101828549.801763 tcpserver: status: 1/40
Dec 1 00:29:09 rh9 pop3d: 1101828549.802037 tcpserver: pid 13680 from
192.168.0.89
Dec 1 00:29:35 rh9 pop3d: 1101828575.847834 tcpserver: ok 13680
rh9.mine.nu:192.168.0.1:110 upsil.rh9.mine.nu:192.168.0.89::4751
Dec 1 00:29:35 rh9 pop3d: 1101828575.957948 tcpserver: end 13680 status 256
Dec 1 00:29:35 rh9 pop3d: 1101828575.958172 tcpserver: status: 0/40
Dec 1 00:30:24 rh9 pop3d: 1101828624.088256 tcpserver: status: 1/40
Dec 1 00:30:24 rh9 pop3d: 1101828624.088382 tcpserver: pid 13962 from
192.168.0.89
とpop3dアクセスに対しても見事ログが図れるようになりました!!! \(^o^)/
大変有難うございました。m(_ _)m
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