qmail-smtp-auth(OP25)送信・受信サーバの変更
wget ftp://ftp.jp.qmail.org/qmail/qmail-1.03.tar.gz
tar xvzf qmail-1.03.tar.gz cd qmail-1.03
wget http://members.elysium.pl/brush/qmail-smtpd-auth/dist/qmail-smtpd-auth-0.31.tar.gz
tar xvzf qmail-smtpd-auth-0.31.tar.gz
mv qmail-smtpd-auth-0.31/* . patch < auth.patch
wget http://tomclegg.net/qmail/qmail-remote-auth.patch
patch < qmail-remote-auth.patch
sed -si ‘s/^extern int errno;$/#include /g’ ./error.h
make qmail-remote
make qmail-smtpd
install -m 711 -g qmail qmail-remote /var/qmail/bin/qmail-remote
install -m 755 -g qmail qmail-smtpd /var/qmail/bin/qmail-smtpd587
vi /etc/init.d/qmail
#!/bin/sh
#
# 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 &’ /usr/local/bin/envdir /etc/relay-ctrl /usr/local/bin/tcpserver -RH -l0 -u qmaild -g nofiles 0 25 /usr/local/bin/relay-ctrl-check /var/qmail/bin/qmail-smtpd & /usr/local/bin/envdir /etc/relay-ctrl /usr/local/bin/tcpserver -RH -l0 -u qmaild -g nofiles 0 587 /usr/local/bin/relay-ctrl-check /var/qmail/bin/qmail-smtpd587 &
# pop /usr/local/bin/envdir /etc/relay-ctrl /usr/local/bin/tcpserver -RH -l0 0 110 /var/qmail/bin/qmail-popup domain-name.tld
/bin/checkpassword /usr/local/bin/relay-ctrl-allow /var/qmail/bin/qmail-pop3d Maildir &
# apop
# tcpserver 0 110 /var/qmail/bin/qmail-popup www.hogehoge.jp /bin/checkpw /var/qmail/bin/qmail-pop3d Maildir & echo touch /var/qmail/lock ;; 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/qmail/lock ;; restart) $0 stop $0 start ;; *)
echo “Usage: S99qmail {start|stop|restart}” exit 1 esac exit 0
echo :SMTPサーバー名:587 ユーザー名 パスワード > /var/qmail/control/smtproutes
SMTP認証情報設定 SMTPサーバー名
プロバイダのSMTPサーバー名
ユーザー名
プロバイダのメールアカウント名 パスワード
プロバイダのメールパスワード
cd .. rm -rf qmail-1.03
コメント