# HG changeset patch # User IBBoard # Date 1582985329 0 # Node ID 6c89e2c3b5aa3c4a6f93b91ef10cd55dca09650e # Parent 2a20a5b7f65a7e78d854fcecf33ba72c9213dd4d Fix outbound mail IP Moved smtp_bind_address to the place where it makes a difference - the SMTP (not SMTPD) service! diff -r 2a20a5b7f65a -r 6c89e2c3b5aa modules/postfix/templates/master.cf.epp --- a/modules/postfix/templates/master.cf.epp Sat Feb 29 13:21:01 2020 +0000 +++ b/modules/postfix/templates/master.cf.epp Sat Feb 29 14:08:49 2020 +0000 @@ -36,7 +36,6 @@ [<%= $mailserver_proxy %>]:smtps inet n - n - - smtpd -o smtpd_upstream_proxy_protocol=haproxy - -o smtp_bind_address6=<%= $mailserver_ip %> -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject @@ -44,7 +43,6 @@ [<%= $mailserver_proxy %>]:submission inet n - n - - smtpd -o smtpd_upstream_proxy_protocol=haproxy - -o smtp_bind_address6=<%= $mailserver_ip %> -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject @@ -80,6 +78,11 @@ proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - n - - smtp + <%- if $mailserver_ip =~ Stdlib::IP::Address::V6 { -%> + -o smtp_bind_address6=<%= $mailserver_ip %> + <%- } else { -%> + -o smtp_bind_address=<%= $mailserver_ip %> + <%- } -%> # When relaying mail as backup MX, disable fallback_relay to avoid MX loops relay unix - - n - - smtp -o smtp_fallback_relay=