ubuntu-server-10-04:postfix
文書の過去の版を表示しています。
Postfix でメールサーバ
本当にメールサーバとして利用するのではなく、
Postfixのインストール
apt-get でインストール。
$ sudo apt-get install postfix
インストール中にダイアログで Postfic の設定ができる。 最初にサーバの使用目的についての説明がでるので、読んだら OK を押す。
- General type of mail configuration
- Internet Site を選択
- System mail name
- 使用するメールアドレスの@以下のアドレス部分を入力
設定
インストール中の設定ではほとんど設定できていないので、追加で設定。
設定用のコマンドがあるのでそれを利用する。
$ sudo dpkg-reconfigure postfix
途中まではインストール中に設定した項目なので飛ばす。
- Root and posmaster mail recipient
- root 宛のメールを転送するユーザ 都合良いユーザのユーザ名を入力
- Other destinations to accept mail for (blank for none)
- 自サーバへのメールと解釈するアドレスをカンマ区切りで入力
- mail.example.com, localhost.localdomain, localhost
- Force synchronous updates on mail queue?
- メールキューの設定のようだが、おそらく大規模なメールサーバでなければどちらでも関係ないと思われ
- No
- Local networks
- ローカルネットワークのアドレスを追加で入力
- 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24
- Mailbox size limit (byte)
- mailbox のサイズを設定。後で maildir 形式に変更するので、0を設定
- Local address extension character
- 何に使うのかよくわからない。デフォルトのままで
- Internet protocols to use
- IPv4 しか使わないので ipv4 を選択
メール保存形式をデフォルトの mbox から maildir に変更。
$ sudo postconf -e 'home_mailbox = Maildir/'
設定内容は /etc/postfix/main.cf に保存されている。
SMTP Authentication
SASLを使って暗号化された回線でSMTP接続できるようにする。
/etc/postfix/main.cf に以下を追加。
smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth-client smtpd_sasl_local_domain = smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_sasl_auth_enable = yes smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination inet_interfaces = all
参考
ubuntu-server-10-04/postfix.1285397522.txt.gz · 最終更新: 2010/09/25 15:52 by admin