Postfix: Relay com o Gmail
Nos ambientes do Debian e Ubuntu.
apt-get install postfix libsasl2-2 ca-certificates libsasl2-modules
CONFIGURE O ARQUIVO MAIN.CF PARA ENVIAR OS EMAILS ATRAVÉS DO GMAIL
root@host# cd /etc/postfix
root@host# mv main.cf main.cf.old
root@host# vim main.cf
~
relayhost = [smtp.gmail.com]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt smtp_use_tls = yes~
root@host#vim /etc/postfix/sasl_passwd
[smtp.gmail.com]:587 rodrigo.root.rj@gmail.com:passw0rdroot@host# chmod 400 /etc/postfix/sasl_passwd
root@host# postmap /etc/postfix/sasl_passwd
TESTEs de Envio
root@host# echo "Assunto do E-MAIL" | mutt -s "Conteudo do EMAIL" usuario@gmail.com
ou
root@host# echo "Teste de relay do panda na Oduvaldocozzi.intranet" | mail -s "oduvaldocozzi.intranet teste RELAY" usuario@gmail.com
Comments
Post a Comment