では、持ってきたファイルを展開してコンパイルしていきましょう。
[root@jiro]/home/nobuo/qmail# tar zxvf qmail-1.03.tar.gz
[root@jiro]/home/nobuo/qmail# cp qmail-date-localtime.patch qmail-1.03
[root@jiro]/home/nobuo/qmail# cp qmail-badremotehost.patch qmail-1.03
[root@jiro]/home/nobuo/qmail# cd qmail-1.03
[root@jiro]/home/nobuo/qmail/qmail-1.03# patch < qmail-date-localtime.patch
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|This patch causes the various qmail programs to generate date stamps in
|the local timezone. I find GMT too annoying to convert from/to. I make
|no warranties that it will work in your timezone, however it works for me.
|
|Works with qmail 1.01 to 1.03.
|
|To apply this patch, cd into the qmail source directory and type...
| patch -s -p1 < patch-to-patch-file
|
|--- qmail-1.03.orig/date822fmt.c Tue Apr 15 15:05:23 1997
|+++ qmail-1.03/date822fmt.c Fri Apr 18 00:39:41 1997
--------------------------
Patching file date822fmt.c using Plan A...
Hunk #1 succeeded at 1.
Hunk #2 succeeded at 13.
done
[root@jiro]/home/nobuo/qmail/qmail-1.03# patch < qmail-badremotehost.patch
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|This patch might be found useful if you would try ASAMI Hideo's idea
|described at http://www.gabacho-net.jp/en/anti-spam/ on qmail.
|
|To try sample rules on the above site, you can put the following lines
|into /var/qmail/control/badremotehost:
|
|^[^\.]*[0-9][^0-9\.]+[0-9]
|^[^\.]*[0-9]{5}
|^([^\.]+\.)?[0-9][^\.]*\.[^\.]+\..+\.[a-z]
|^[^\.]*[0-9]\.[^\.]*[0-9]-[0-9]
|^[^\.]*[0-9]\.[^\.]*[0-9]\.[^\.]+\..+\.
|^(dhcp|dialup|ppp|adsl)[^\.]*[0-9]
|# IP address due to no FQDN
|[0-9]$
|
|And also white list into /var/qmail/control/goodremotehost as follows:
|
|# Jun. 06, 2004: iad-fw-global.amazon.com
|^207\.171\.(167\.25|172\.6)$
|# Oct. 28, 2004: 207-171-180-101.amazon.com
|\.amazon\.com$
|
|
|Any suggestions for improvements or corrections are welcome at naokih at
|iron-horse dot org.
|
|--- Makefile.orig Mon Jun 15 03:53:16 1998
|+++ Makefile Wed Nov 24 02:34:30 2004
--------------------------
Patching file Makefile using Plan A...
Hunk #1 succeeded at 1534.
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- qmail-smtpd.c.orig Mon Jun 15 03:53:16 1998
|+++ qmail-smtpd.c Wed Nov 24 02:34:30 2004
--------------------------
Patching file qmail-smtpd.c using Plan A...
Hunk #1 succeeded at 50.
Hunk #2 succeeded at 217.
Hunk #3 succeeded at 314.
done
無事パッチが適用できたら、コンパイルしてみましょう。
[root@jiro]/home/nobuo/qmail/qmail-1.03# make setup check
(省略)
おすすめ