| □メニュー
えむけいプラン
〒020-0065
岩手県盛岡市西下台町17-41
TEL:019-651-2986
FAX:019-651-2987 |
sendmail-8.11.1のインストール
このページは古いので、こちらが良いと思う。
最新版はsendmail-8.11.1(2000/11/29)で日本のCFツールも更新されていないようである。
そこで標準添付のcfを使った設定を行う。
ソースの展開
| tar xvfz sendmail.8.11.1.tar.gz |
コンパイル
cd sendmail.8.11.1/sendmail
./Build
cd ../makemap
./Build
|
インストール
まず、オリジナルのファイルを保存しておく。
cp /usr/lib/sendmail /usr/lib/sendmail.org
or
cp /usr/sbin/sendmail /usr/sbin/sendmail.org
cp /usr/sbin/makemap /usr/sbin/makemap.org
|
インストール
cd ../sendmail
./Build install
cd ../makemap
./Build install
|
sendmail.cf の作成
WIDE CF は、sendmail-8.9.x 用しかないため、付属の cf ツールを利用する。
CFでは難しい設定でもm4版で出来るそうだ。
cd ../cf/cf
cp generic-bsd4.4.mc config.mc
ee config.mc |
config.mcの編集
divert(0)dnl
OSTYPE(bsd4.4)dnl
DOMAIN(generic)dnl
→受信するドメインを/etc/mail/local-host-nameに記述する。(後述)
FEATURE(`virtusertable')dnl
→/etc/mail/virtusertable で、各ドメイン宛のメールをどのユーザーに集めるか指定できる(後述)
MAILER(local)dnl
MAILER(smtp)dnl |
cfの作成
cfの動作確認
cfは本稼動する前に動作確認をすることが出来る。
# sendmail -bt -f ./sendmail.cf
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 3,0 root@milkbar.habit.net
3 input: root @ milkbar . habit . net
96 input: root < @ milkbar . habit . net >
96 returns: root < @ milkbar . habit . net >
3 returns: root < @ milkbar . habit . net >
0 input: root < @ milkbar . habit . net >
97 input: root
3 input: root
3 returns: root
0 input: root
0 returns: $# local $: root
97 returns: $# local $: root
0 returns: $# local $: root
|
localのroot宛になっていることがわかる。
> 3,0 root@habit.net
3 input: root @ habit . net
96 input: root < @ habit . net >
96 returns: root < @ habit . net >
3 returns: root < @ habit . net >
0 input: root < @ habit . net >
88 input: < smtp : habit . net > . root < @ habit . net >
88 returns: $# smtp $@ habit . net . $: root < @ habit . net >
0 returns: $# smtp $@ habit . net . $: root < @ habit . net >
|
同じroot宛だが、smtpを経由してhabit.net宛になっている。
テストの終了は ctrl+D
cfの移動
| cp config.cf /etc/mail/sendmail.cf |
その他の設定
受信するドメインを入れる
| ee /etc/mail/local-host-names |
aliasesファイルを移動
cp /etc/aliases /etc/mail/aliases
cp /etc/aliases.db /etc/mail/aliases.db |
sendmail の起動
| /usr/sbin/sendmail -bd -q30m |
sendmailの起動確認
# telnet localhost smtp
Trying 127.0.0.1...
Connected to localhost.mk.habit.net.
Escape character is '^]'.
220 milkbar.habit.net ESMTP Sendmail 8.11.2/3.7W; Sun, 15 Apr 2001
17:18:21 +0900 (JST) |
と出るとOKである。
終了は quit を行なう
参考
How to install
sendmail-8.11.1
http://akiba.to/note.html
SPAM の現状と対策
|