2019年8月11日 星期日
Configure A Postfix Relay Through Gmail On CentOS 7
參考:
https://devops.ionos.com/tutorials/configure-a-postfix-relay-through-gmail-on-centos-7/
yum -y install postfix cyrus-sasl-plain mailx
#systemctl restart postfix
#systemctl enable postfix
# Configure Postfix
vi /etc/postfix/main.cf
# 必須修改
inet_interfaces = all
# 以下加入
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = encrypt
---
# 修改密碼檔
vi /etc/postfix/sasl_passwd
[smtp.gmail.com]:587 username:password
---
chown root:postfix /etc/postfix/sasl_passwd*
chmod 640 /etc/postfix/sasl_passwd*
systemctl reload postfix
---
Test Relay
echo "This is a test." | mail -s "test message" cc.vbhsieh@gmail.com
---
訂閱:
張貼留言 (Atom)
RHEL install EPEL
https://www.linuxtechi.com/install-epel-repo-on-rhel-system/ EPEL dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest...
-
轉自 ORA-01722 during upgrade 10.2 to 11.2 Yesterday I was trying to upgrade my 10.2 database to 11.2 version in new host and I got below e...
-
爆笑到不行
-
記事本開啟 HKEY_CLASSES_ROOT\*\shell] [HKEY_CLASSES_ROOT\*\shell\NotePad] @="用記事本開啟" [HKEY_CLASSES_ROOT\*\shell\NotePad\command] @=...
沒有留言:
張貼留言