&tag(CentOS6/Postfix); *目次 [#h1e395f5] #contents *参考情報 [#j4b17f74] **インストール [#a3552b71] -yumを使う # yum install postfix **設定 [#i0ffa735] -/etc/postfix/main.cfを編集する。以下独自ドメインexample.comの場合の設定。 -本登録しないと送信用SMTPポートは使えないので注意。iptablesにも穴をあけておかないとダメ。 -[[さくらのVPSをもう少しセットアップしてみる - @blog.justoneplanet.info:http://blog.justoneplanet.info/2010/10/24/%E3%81%95%E3%81%8F%E3%82%89%E3%81%AEvps%E3%82%92%E3%82%82%E3%81%86%E5%B0%91%E3%81%97%E3%82%BB%E3%83%83%E3%83%88%E3%82%A2%E3%83%83%E3%83%97%E3%81%97%E3%81%A6%E3%81%BF%E3%82%8B/]]が参考になる。 #pre{{ myhostname = mail.example.com mydomain = example.com inet_interface = all mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain home_mailbox = Maildir/ smtpd_banner = $myhostname ESMTP unknown smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination message_size_limit = 10485760 }} **起動設定 [#g7f4f21e] ***saslauthdの起動 [#ub60f977] -外部からSMTP接続を許可するときに使われる認証用サーバーを起動する #pre{{ # /etc/init.d/saslauthd start # chkconfig saslauthd on }} **postfixの起動 [#qc9c2ea9] -postfixデーモンを起動。 #pre{{ # /etc/init.d/postfix start # chkconfig postfix on }} **テスト [#dd59fb29] ***送信テスト [#n1eb0039] -送信テストはmail foo@bar.com などmailコマンドでメールを送れるかどうか確認。 ***不正中継していないかどうかの確認 [#h4222a2a] -[[Postfixのぺーじ−Postfixでのspam対策:http://www.postfix-jp.info/origdocs/antispam.html]]が参考になる。 **転送する [#y28d1fd2] /etc/aliasesを編集し、正しく転送されればOK。編集後newaliasesを実行しないと反映されないかも。