Pencarian

Sabtu, 28 Agustus 2021

Postfix SMTP Relay gmail

 Setting smtp relay di postfix

# apt-get update

#apt-get install postfix sasl2-bin libsasl2-2 libsasl2-modules

buat file

 # nano /etc/postfix/sasl_passwd

lalu isi dengan

smtp.gmail.com youremail@gmail.com:yourpassword

# postmap hash:/etc/postfix/sasl_passwd

# chmod 600 /etc/postfix/sasl_passwd

# cp /etc/postfix/main.cf /etc/postfix/main.cf.backup

nano /etc/postfix/main.cf

relayhost = smtp.gmail.com:587

smtp_use_tls = yes

smtp_sasl_auth_enable = yes

smtp_sasl_security_options =

smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

smtp_tls_CAfile = /etc/ssl/certs/Entrust_Root_Certification_Authority.pem

smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_tls_session_cache

smtp_tls_session_cache_timeout = 3600s

# postfix reload

# echo "test message" | mail -s "test subject" youremail@gmail.com


Tidak ada komentar:

Posting Komentar