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 件のコメント:

コメントを投稿

terraform(moved.tf)のリソース名の修正方法について

以下の赤枠を直接変えてしまうと、ec2が削除されてしまいます。 これを維持したい場合について記載します。 以下に moved.tf ファイルを作成します。 以下のように、 from に修正前で、 to に修正したい内容を記載します。 以下のリソースにも修正を加えます。 terra...