2016-07-06 11:59:56 +00:00
|
|
|
{{range $mailhosts := split (getenv "MAILHOSTS") ";"}}
|
|
|
|
{{$values := split ($mailhosts) ":"}}
|
|
|
|
{{index $values 0}}:smtp inet n - - - - smtpd
|
|
|
|
-o myhostname={{index $values 1}}
|
|
|
|
-o smtpd_tls_key_file=/etc/ssl/mail/{{index $values 1}}/privkey.pem
|
|
|
|
-o smtpd_tls_cert_file=/etc/ssl/mail/{{index $values 1}}//fullchain.pem
|
|
|
|
|
|
|
|
{{index $values 1}}-out unix - - - - - smtp
|
|
|
|
-o smtp_bind_address={{index $values 0}}
|
|
|
|
-o smtp_helo_name={{index $values 2}}
|
|
|
|
-o syslog_name=postfix-{{index $values 2}}
|
|
|
|
|
|
|
|
{{index $values 0}}:submission inet n - - - - smtpd
|
|
|
|
-o syslog_name=postfix/submission
|
|
|
|
-o smtpd_tls_security_level=encrypt
|
|
|
|
-o smtpd_sasl_auth_enable=yes
|
2016-07-06 13:00:07 +00:00
|
|
|
-o smtpd_relay_restrictions=permit_mynetworks,permit_sasl_authenticated,defer_unauth_destination
|
2016-07-06 11:59:56 +00:00
|
|
|
-o milter_macro_daemon_name=ORIGINATING
|
|
|
|
-o smtpd_tls_key_file=/etc/ssl/mail/{{index $values 1}}/privkey.pem
|
|
|
|
-o smtpd_tls_cert_file=/etc/ssl/mail/{{index $values 1}}//fullchain.pem
|
|
|
|
{{end}}
|