qmail spf 対応
さぁ、次は受信側のSPF対応だというわけで、約1年ぶりにqmailのbuildを実施。アップデートされたという話は聞いてないが、念の為ググってみると、最近は最低限のパッチをセットしたnetqmailからbuildするのが主流なのだそうだ。
まず、netqmail-1.05.tar.gzを展開して./collate.shでパッチ適用した後、qmail-date-localtime、qmail-spf-rc5.patch、qmail-large-dns.patchを適用。手作業でマージする事もなく意外とすんなり片付いたなぁ、と思いつつsetupしたら外からのSMTPが接続できなかった。
でもログをみるとtcpserver的にはOKなので、SMTP認証のqmail-vidaとの連携が怪しい。昔のqmail-vida導入メモを読みなおすと、やはりqmail-vidaにqmail用のパッチがある事がわかった。
このパッチは3ファイル合わせて6ヶ所で適用に失敗したが、.rejファイルに吐出された分を手作業で適用。追加ファイルもコピーしたあとbuildしなおし、netqmail-1.05をsetupしたらOKだった。
[owner@host software]$ tar zxfv ~/archives/netqmail-1.05.tar.gz
netqmail-1.05/
netqmail-1.05/qmail-1.03.tar.gz
- 一部省略 -
netqmail-1.05/COPYRIGHTS
netqmail-1.05/netqmail-1.05.patch
[owner@host software]$ cd netqmail-1.05
[owner@host netqmail-1.05]$ tar zxfv ~/archives/qmail-vida-0.53.tar.gz
- 省略 -
[owner@host netqmail-1.05]$ ./collate.sh
You should see 7 lines of text below. If you see anything
else, then something might be wrong.
[1] Extracting qmail-1.03...
tar: Read 1024 bytes from -
[2] Patching qmail-1.03 into netqmail-1.05. Look for errors below:
24
[4] The previous line should say 24 if you used GNU patch.
[5] Renaming qmail-1.03 to netqmail-1.05...
[6] Continue installing qmail using the instructions found at:
[7] http://www.lifewithqmail.org/lwq.html#installation
[owner@host netqmail-1.05]$ cd netqmail-1.05
[owner@host netqmail-1.05]$ patch -p1 < ~/archives/qmail-date-localtime.patch
- 省略 -
[owner@host netqmail-1.05]$ patch -p1 < ~/archives/qmail-spf-rc5.patch
- 省略 -
[owner@host netqmail-1.05]$ patch -p0 < ~/archives/qmail-large-dns.patch
- 省略 -
[owner@host netqmail-1.05]$ patch -p0 < ../qmail-vida-0.53/patch/qmail.patch
- 一部省略 -
2 out of 14 hunks FAILED -- saving rejects to file Makefile.rej
2 out of 4 hunks FAILED -- saving rejects to file qmail-popup.c.rej
2 out of 14 hunks FAILED -- saving rejects to file qmail-smtpd.c.rej
[owner@host netqmail-1.05]$ ** 上記3ファイルは手作業でマージ **
[owner@host netqmail-1.05]$ cd ~/software/qmail-vida-0.53
[owner@host qmail-vida-0.53]$ vi Makefile
QMAILSRC = ../netqmail-1.05
- 一部省略 -
[owner@host qmail-vida-0.53]$ make copy
- 省略 -
[owner@host netqmail-1.05]$ cd ../netqmail-1.05
[owner@host netqmail-1.05]$ make
[owner@host netqmail-1.05]$ ~/bin/qmail-stop.sh
[owner@host netqmail-1.05]$ sudo make setup check
[owner@host netqmail-1.05]$ su
Password:
[owner@host netqmail-1.05]# echo 1 /var/qmail/control/spfbehavior
[owner@host netqmail-1.05]# [Ctrl-D]
[owner@host netqmail-1.05]$ ~/bin/qmail-start.sh