CentOS7

メールサーバーのOP25B対策(Postfix編)

Gmailのメールサーバーから送信するメールはOP25Bの影響は受けないため、全ての送信メールをGmailを経由して送信するようにする。

Postfix設定

[root@centos ~]# vi /etc/postfix/main.cf ← Postfix設定ファイル編集
以下を最終行へ追加
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_tls_security_options = noanonymous
smtp_sasl_mechanism_filter = plain
smtp_tls_CApath = /etc/pki/tls/certs/ca-bundle.crt

SMTP認証情報設定

[root@centos ~]# echo [smtp.gmail.com]:587 Gmailアドレス:Gmailパスワード > /etc/postfix/sasl_passwd ← SMTP認証情報設定
[root@centos ~]# chmod 640 /etc/postfix/sasl_passwd ← root以外参照できないようにパーミッション変更
[root@centos ~]# postmap /etc/postfix/sasl_passwd ← SMTP認証情報のデータベース化

Postfix設定反映

[root@centos ~]# systemctl reload postfix ← Postfix設定反映

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS