Retransmitir e-mail de saída através do GMail no OSX Mavericks

  • Editar /etc/postfix/main.cf
################################
# GMail relay
###############################

# sets gmail as relay
relayhost
= [smtp.gmail.com]:587

# use tls
smtp_use_tls
= yes

# use sasl when authenticating to foreign SMTP servers
smtp_sasl_auth_enable
= yes

# path to password map file
smtp_sasl_password_maps
= hash:/etc/postfix/sasl_passwd

# eliminates default security options which are imcompatible with gmail
smtp_sasl_security_options
=

smtp_tls_session_cache_database
= btree:$data_directory/smtp_tls_session_cache
  • Crie e edite / etc / postfix / sasl_passwd (crie uma senha específica do aplicativo se você usar a autenticação de dois fatores do Google para o GMail)
[smtp.gmail.com]:587  username:password
  • Gerar arquivos sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
  • Recarregar Postfix
sudo postfix reload
  • Envie um e-mail de teste para você mesmo
date | mail -s testing your@email.com
  • Depurar
tail -f /var/log/mail.log