2017年10月28日土曜日

postfixメールの送信が出来ない対策

通常のポート25番をつかうと、送信不可になるので
以下の方法で行う

注意)メールサーバーによってブロックされる可能あり

vi /etc/postfix/main.cf
末端に追加する
—————main.cf——————————————
relayhost = [smtp-relay.gmail.com]:587
smtp_use_tls = yes
smtp_tls_CApath = /etc/pki/tls/certs/ca-bundle.crt
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
――――――――――――――――――――――-


vi /etc/postfix/sasl_passwd
——————————sasl_passwd————————
[smtp-relay.gmail.com]:587    googleのアカウント:パスワード
――――――――――――――――

chmod 600 /etc/postfix/sasl_passwd
systemctl restart postfix
postmap hash:/etc/postfix/sasl_passwd


yum -y install cyrus-sasl-plain cyrus-sasl-md5

0 件のコメント:

コメントを投稿

k8s node version UP(1.34.1 > 1.34.2)

[ マスターノードでの準備と安全確保] 1)etcdctl クライアントのインストール: (未インストールの場合は必要) apt update apt install etcd-client 2)etcd バックアップの取得と退避 (最重要): ETCDCTL_API...