CentOS 5.2 に Postfix を SMTP-AUTH 含めて外部レンタルサーバ仕様でセットアップする
VPSサーバに独自ドメインを用いてSMTPサーバをセットアップしたのでメモしておく。 スパムメール送信防止で Outbound Port 25 Blocking を行っているプロバイダーが多く、自分のところも該当している。そのため、Submission Port 587 でSMTP認証(SMTP AUTH)をサポートする必要があったのでその設定も行う。なお、SMTP 認証は PLAIN でセットアップした。 yum から必要なパッケージをインストール # yum install postfix.i386 # yum install cyrus-sasl-plain.i386 Postfix /etc/postfix/main.cf の設定 書き換え追加して設定した部分は下記のとおり。mailbox は Maildir にする。SASL の設定を追記した。 ※ホストのFQDNは mail.domain.tld で受け取るメールアドレスは user@domain.tld とする。 myhostname = mail.domain.tld mydomain = domain.tld myorigin = $mydomain mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mynetworks_style = host home_mailbox = Maildir/ \# SMTP-Auth # smtpd\_sasl\_auth_enable = yes smtpd\_tls\_auth_only = no smtpd\_sasl\_local_domain = $myhostname smtp\_sasl\_security_options = noanonymous smtpd\_recipient\_restrictions = permit\_mynetworks, permit\_sasl\_authenticated, reject\_unau th_destination disable\_vrfy\_command = yes ※レンタルサーバは 1 ホストだけの構成として、mynetworks_style = host とホスト単体に設定した。 ...