qmail で POP インストールのメモは以下を参照。 qmailinstallmemo.txt < 参考 > ・qmail-pop3d の設定 http://djb.qmail.jp/qmail/faq/servers.html#pop3d < POP パスワード認証 > ・checkpassowrd を入れる http://cr.yp.to/checkpwd.html インストール方法は以下を参照。 http://cr.yp.to/checkpwd/install.html 取得して展開して make rin@mariko[~/cmp]% tar xzf checkpassword-0.90.tar.gz rin@mariko[~/cmp]% cd checkpassword-0.90 cd checkpassword-0.90 rin@mariko[~/cmp/checkpassword-0.90]% make rin@mariko[~/cmp/checkpassword-0.90]% make setup check ./install install: fatal: unable to write .../bin/checkpassword: access denied make: *** [setup] エラー 111 怒られたので su rin@mariko[~/cmp/checkpassword-0.90]% su bash-2.04# make setup check ./install ./instcheck < アクセスデータベースの作成 > ・こんなファイル bash-2.04# cat /etc/tcp.pop3 # # qmail-pop3d config # 192.168.0.:allow 127.0.0.:allow .area51.gr.jp:allow .kamome.or.jp:allow 作成 bash-2.04# /usr/local/bin/tcprules /etc/tcp.pop3.cdb /etc/tcp.pop3.tmp < /etc/tcp.pop3 ・inetd.conf の記述をコメントアウト bash-2.04# grep pop3 /etc/inetd.conf ## pop3 stream tcp nowait root /usr/sbin/tcpd in.pop3d # The ipop3d POP3 server is part of the Pine distribution. If you've # installed the Pine package, you may wish to switch to ipop3d by # commenting out the pop3 line above, and uncommenting the pop3 line below. #pop3 stream tcp nowait root /usr/sbin/tcpd ipop3d ・ inetd を再起動 bash-2.04# kill -HUP 57 < qmail-pop3d 起動 > bash-2.04# /usr/local/bin/tcpserver -v -x /etc/tcp.pop3.cdb -R -H 0 110 /var/qmail/bin/qmail-popup sakura.area51.gr.jp /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir 2>&1 | /var/qmail/bin/splogger pop3d 3 & < 動作確認 > rin@mariko[~]% telnet 192.168.0.5 110 telnet 192.168.0.5 110 Trying 192.168.0.5... Connected to 192.168.0.5. Escape character is '^]'. +OK <20201.1062171350@sakura.area51.gr.jp> user rin +OK pass xxxxxxxxxx +OK list +OK 1 1113 2 1253 3 1115 4 1109 5 1252 6 268 7 286 8 271 9 271 10 269 11 268 12 296 13 290 14 370 15 272 16 370 17 277 18 268 19 287 . quit +OK Connection closed by foreign host. rin@mariko[~]% < qmail-pop3d を damontools で監視する > ・ディレクトリを作って run スクリプトを書く bash-2.04# cd /var/qmail/supervise/ bash-2.04# mkdir pop3d bash-2.04# cd pop3d/ bash-2.04# cat run exec env - PATH="/var/qmil/bin:/sbin:/bin:/usr/sbin:/usr/bin/:/usr/local/sbin:/usr/local/bin" tcpserver -v -x /etc/tcp.pop3.cdb -R -H 0 110 qmail-popup sakura.area51.gr.jp /bin/checkpassword qmail-pop3d Maildir 2>&1 ・すでに動いている pop3d を kill する bash-2.04# ps auxw | grep pop3 root 20197 0.0 0.0 1224 72 ? S Aug30 0:00 /usr/local/bin/tcpserver -v -x /etc/tcp.pop3.cdb -R -H 0 110 /var/qma root 20198 0.0 0.1 1220 220 ? S Aug30 0:00 /var/qmail/bin/splogger pop3d 3 root 18573 0.0 0.1 1196 352 ? S 19:07 0:00 supervise pop3d root 19085 0.0 0.3 2192 632 pts/2 S 19:21 0:00 grep pop3 bash-2.04# kill 20197 bash-2.04# ps auxw | grep pop3 root 18573 0.0 0.1 1196 352 ? S 19:07 0:00 supervise pop3d root 19087 0.0 0.3 2188 620 pts/2 S 19:21 0:00 grep pop3 ・ ln して起動確認 bash-2.04# ln -s /var/qmail/supervise/pop3d /service/pop3d bash-2.04# svstat /service/pop3d/ /service/pop3d/: up (pid 19089) 14 seconds