Postfixをインストールする

[index]
・なにもの?

 MTA。
 sendmailより設定が楽で、堅固で速いらしい。 最初はqmailにしようかと思ったんだけど、sendmailから離れすぎているようなので、 やめた模様。
 詳しくは、UNIX USERの2000年10月号でも、どうぞ。

・手順

http://www.postfix.org/からソースを取ってきて、解凍する。

 # cd /usr/local/src
 # tar zxvf postfix-19991231-pl09.tar.gz

コンパイルする。

 # make

インストールする前に、postfixが使用するユーザとグループを作成する。
今回は単純にpostfix、postfix。
そして、インストール。

 # make install

いくつか質問されるので、以下のように答えてみる。

 install_root: [/] (入力なしでリターン)
 tempdir: [/usr/local/src/postfix-19991231-pl09] (入力なしでリターン)
 config_directory: [/etc/postfix] /opt/postfix/etc
 daemon_directory: [/usr/libexec/postfix] /opt/postfix/bin
 command_directory: [/usr/sbin] /opt/postfix/bin
 queue_directory: [/var/spool/postfix] (入力なしでリターン)
 sendmail_path: [/usr/sbin/sendmail] /opt/postfix/bin/sendmail
 newaliases_path: [/usr/bin/newaliases] /opt/postfix/bin/newaliases
 mailq_path: [/usr/bin/mailq] /opt/postfix/bin/mailq
 mail_owner: [postfix] (入力なしでリターン)
 setgid: [no] (入力なしでリターン)
 manpages: [/usr/local/man] (入力なしでリターン)

インストールされたので、/opt/postfix/etc/main.cfを以下のように編集。
変更点は以下。

 myhostname = HardWired.shuffle.dyndns.org
 mydomain = shuffle.dyndns.org
 myorigin = $mydomain
 inet_interfaces = all
 mydestination = $myhostname, localhost.$mydomain, $mydomain, mail.$mydomain, www.$mydomain, ftp.$mydomain

起動は、

 # /opt/postfix/bin/postfix start

こんな感じ。/etc/rc.localにも、書きくわえておく。
ちなみに、設定をいじった後は、

 # /opt/postfix/bin/postfix reload

を、忘れるな。

・結論
 sendmail、捨て。
 いや、結構、マジで。あの謎だらけの設定ファイルと格闘するのはもう嫌。

Original Copyright (c)1997-2000 KOIWA Hidekazu,
all rights reserved