diff --git a/templates/etc/postfix/main.cf.j2 b/templates/etc/postfix/main.cf.j2 index ba9431c..f8c3b11 100644 --- a/templates/etc/postfix/main.cf.j2 +++ b/templates/etc/postfix/main.cf.j2 @@ -85,6 +85,10 @@ smtp_sasl_security_options = {{ postfix_sasl_security_options }} smtp_sasl_tls_security_options = {{ postfix_sasl_tls_security_options }} smtp_sasl_mechanism_filter = {{ postfix_sasl_mechanism_filter }} {% endif %} +{% else %} +relayhost = +{% endif %} + {% if postfix_relaytls %} smtp_use_tls = {{ postfix_relaytls | bool | ternary('yes', 'no') }} smtp_tls_security_level = {{ postfix_smtp_tls_security_level }} @@ -93,9 +97,6 @@ smtp_tls_note_starttls_offer = {{ postfix_smtp_tls_note_starttls_offer | bool | smtp_tls_CAfile = {{ postfix_smtp_tls_cafile }} {% endif %} {% endif %} -{% else %} -relayhost = -{% endif %} {% if postfix_smtpd_client_restrictions is defined %} smtpd_client_restrictions = {{ postfix_smtpd_client_restrictions | join(', ') }}