postfix install
# yum install postfix cyrus-sasl cyrus-sasl-devel
# vi /etc/postfix/main.cf
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.trust.crt
smtp_sasl_security_options =
# vi /etc/postfix/sasl_passwd
[smtp.gmail.com]:587 GoogleAccount@gmail.com:GootleAccountPassword
# chmod 400 /etc/postfix/sasl_passwd
# postmap /etc/postfix/sasl_passwd
# service postfix reload
Test
# echo "Postfix Mail Test Success!!" | mail -S from="GoogleAccount@gmail.com" -s "Postfix Mail Test" "GoogleAccount@gmail.com"
댓글 없음:
댓글 쓰기