pinkeen.postfix-relay
Instaluje i konfiguruje Postfix do przekazywania e-maili do zewnętrznych usług, takich jak Mailgun, Mailchimp, SendGrid...
Moim zdaniem zazwyczaj lepiej jest używać lokalnego Postfixa jako bufora, niż korzystać z API lub bezpośrednio SMTP z aplikacji, ale możesz mieć inne zdanie.
Obecnie obsługiwany jest tylko jeden relay, ale Postfix może kierować e-maile na podstawie hosta w envelope from (relayhostsby), co powinno być łatwe do dostosowania.
Zmienne:
postfix_relay_hostpostfix_relay_usernamepostfix_relay_passwordpostfix_relay_port
Notatki o routingu e-maili w wielu hostach
W main.cf: sender_dependent_relayhost_maps = hash:/etc/postfix/relayhostsby
W /etc/postfix/relayhostsby:
@fromhost1 [jakąsinnązewnętrznąusługę]
@fromhost2 [smtp.mandrillapp.com]:587
@fromhost3 [smtp.mandrillapp.com]:587
W /etc/postfix/sasl_passwd:
@fromhost1 hostuser:hostpass
@fromhost2 mandrilluser:mandrillpass
@fromhost3 mandrilluser:mandrillpass
Inne opcje, które prawdopodobnie rozwiązują pewne problemy:
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
Zainstaluj
ansible-galaxy install pinkeen.postfix-relayLicencja
Unknown
Pobrania
5.9k
Właściciel
All things science, tech, people. Solving problems as a programmer, server guy and photographer.
