Aysad Kozanoglu - Mimarist

Server Howtos & Tutorials

Postfix email via Gmail senden als relay

15 Dezember, 2016 | Server Anleitungen

google account einrichten

folgende Schritt  bei google durchführen:

https://accounts.google.com/DisplayUnlockCaptcha

 

nano /etc/postfix/sasl_passwd

gmail-smtp.l.google.com emailaccount@gmail.com:PASSWORD
smtp.gmail.com emailaccount@gmail.com:PASSWORD

 

nano /etc/poftfix/main.cf

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
# Secure channel TLS with exact nexthop name match.
smtp_tls_security_level = secure
smtp_tls_mandatory_protocols = TLSv1
smtp_tls_mandatory_ciphers = high
smtp_tls_secure_cert_match = nexthop
smtp_tls_CAfile = /etc/postfix/ca-bundle.crt
relayhost = smtp.gmail.com:587

download ca-bundle.crt > /etc/postfix/ca-bundle.crt

ca-bundle.crt link:
https://gist.github.com/AysadKozanoglu/610f93018ab7862920559f6d9659d357

ca-bundle.crt  link 2:
http://kozanoglu.de/note/index.php?controller=post&action=view&id_post=93

postfix neustarten

 

testen

sendmail aysadx@gmail.com < /tmp/mail.txt  (email inhalt text)

 

nützliche Links:
https://charlesauer.net/tutorials/centos/postfix-as-gmail-relay-centos.php