Wikipedia

検索結果

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

(1)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 = login,plain
smtp_tls_CApath = /etc/pki/tls/certs/ca-bundle.crt
(2)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認証情報のデータベース化
 
(3)Postfix設定反映
[root@centos ~]# systemctl reload postfix ← Postfix設定反映※CentOS7の場合

[root@centos ~]# /etc/rc.d/init.d/postfix reload ← Postfix設定反映※CentOS6の場合

0 件のコメント:

コメントを投稿