update postfix run script

This commit is contained in:
Sebastian Hugentobler 2016-07-06 15:00:07 +02:00
parent fc3a549ef8
commit f117ecbfe5
2 changed files with 22 additions and 1 deletions

View File

@ -1,3 +1,24 @@
{{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
-o smtpd_relay_restrictions=permit_mynetworks,permit_sasl_authenticated,defer_unauth_destination
-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}}
smtp inet n - n - - smtpd
pickup unix n - n 60 1 pickup

2
tmp
View File

@ -14,7 +14,7 @@
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o smtpd_relay_restrictions=permit_mynetworks,permit_sasl_authenticated,defer_unauth_destination
-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