pinkeen.postfix-relay

Instala y configura Postfix para retransmitir correos electrónicos a un servicio externo como Mailgun, Mailchimp, SendGrid...

En mi opinión, generalmente es mejor usar Postfix local como almacenamiento en lugar de usar la API o SMTP directamente desde la aplicación, pero puede que tu experiencia varíe.

Actualmente solo se admite un relé, pero Postfix puede enrutar correos electrónicos según el envelope from (relayhostsby), por lo que debería ser fácil de adaptar.

Variables:

  • postfix_relay_host
  • postfix_relay_username
  • postfix_relay_password
  • postfix_relay_port

Notas sobre el enrutamiento de correo multihost

En main.cf: sender_dependent_relayhost_maps = hash:/etc/postfix/relayhostsby

En /etc/postfix/relayhostsby:

@fromhost1 [otroservicioexterior]
@fromhost2 [smtp.mandrillapp.com]:587
@fromhost3 [smtp.mandrillapp.com]:587

En /etc/postfix/sasl_passwd:

@fromhost1 usuariohost:contraseñahost
@fromhost2 usuario_mandrill:contraseña_mandrill
@fromhost3 usuario_mandrill:contraseña_mandrill

Algunas otras opciones que probablemente resuelvan algunos problemas:

sender_dependent_relayhost_maps = hash:/etc/postfix/relayhostsby
smtp_sender_dependent_authentication = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_auth_enable = yes
smtp_use_tls = yes
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
smtp_tls_security_level = may
smtpd_tls_received_header = yes
tls_random_source = dev:/dev/urandom
smtpd_tls_security_level = may
smtp_use_tls = yes
smtp_sasl_security_options = noanonymous
Acerca del proyecto

Configure postfix as relay

Instalar
ansible-galaxy install pinkeen.postfix-relay
Licencia
Unknown
Descargas
5.8k
Propietario
All things science, tech, people. Solving problems as a programmer, server guy and photographer.