qmail 1.03


1. ユーザー/グループ作成

# groupadd -g 50 nofiles
# groupadd -g 51 qmail
# useradd -u 101 -g nofiles -d /var/qmail/alias alias
# useradd -u 102 -g nofiles -d /var/qmail qmaild
# useradd -u 103 -g nofiles -d /var/qmail qmaill
# useradd -u 104 -g nofiles -d /var/qmail qmailp
# useradd -u 105 -g qmail -d /var/qmail qmailq
# useradd -u 106 -g qmail -d /var/qmail qmailr
# useradd -u 107 -g qmail -d /var/qmail qmails


2. インストール

# wget http://cr.yp.to/software/qmail-1.03.tar.gz
# wget http://cr.yp.to/software/checkpassword-0.81.tar.gz
# wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
# wget ftp://ftp.nlc.net.au/pub/unix/mail/qmail/qmail-date-localtime.patch
# tar xvfpz qmail-1.03.tar.gz
# cd qmail-1.03
# cp ../qmail-date-localtime.patch .
# patch < qmail-date-localtime.patch
# make setup check
# ./config
(DNSがひけない場合は ./config-fast who.domain.com)
# touch /var/qmail/alias/.qmail
# touch /var/qmail/alias/.qmail-root
# touch /var/qmail/alias/.qmail-postmaster
# touch /var/qmail/alias/.qmail-mailer-daemon
# cd ..
# tar xvfpz checkpassword-0.81.tar.gz
# cd checkpassword-0.81
# make setup check
# cd ..
# tar xvfpz ucspi-tcp-0.88.tar.gz
# cd ucspi-tcp-0.88
# make setup


4. 設定

# echo '192.168.:allow,RELAYCLIENT=""' > /etc/tcp.smtp
# echo '127.:allow,RELAYCLIENT=""' >> /etc/tcp.smtp
# echo ':allow' >> /etc/tcp.smtp
# /usr/local/bin/tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
# echo '#\!/bin/sh' > /var/qmail/rc
# echo 'exec env - PATH="/var/qmail/bin:$PATH" qmail-start ./Maildir/ splogger qmail &' >> /var/qmail/rc
# echo '/usr/local/bin/tcpserver -v -u 102 -g 50 -x /etc/tcp.smtp.cdb 0 25 /var/qmail/bin/qmail-smtpd &' >> /var/qmail/rc
# echo '/usr/local/bin/tcpserver 0 110 /var/qmail/bin/qmail-popup who.domain.com /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir &' >> /var/qmail/rc
# chmod 700 /var/qmail/rc
# kill `ps ax|grep inetd|awk 'print $1'`
(/etc/inetd.conf のpop3の行をコメントアウトしてからinetdをHUPしてもいい)
# kill `ps ax | grep sendmail | awk '{print $1}'`
# ln -fs /var/qmail/bin/sendmail /usr/sbin/sendmail
# (cd /etc/template/Desktop; mkdir Maildir Maildir/new Maildir/cur Maildir/tmp; chmod -R 700 Maildir; rm -Rf Mail)
# mule /etc/rc.d/rc.M
(sendmailに関するところをコメントアウト)
# echo '/var/qmail/rc &' >> /etc/rc.d/rc.local


5. 起動

# /var/qmail/rc &


6. メモ

自分で言うのもなんだけど、かなり手抜きが多いので各人で対応してください。