Cleanup of dovecot vs. LDAP settings

This commit is contained in:
Morre 2020-07-12 13:58:00 +02:00
parent 114b0450f1
commit ac2deb37e4
No known key found for this signature in database
GPG key ID: 5D9B9B1B8F424BBC

View file

@ -83,14 +83,24 @@ smtpd_recipient_restrictions = permit_mynetworks,
{% if ("virtual_transport" in postfix and postfix.virtual_transport == "dovecot") {% if ("virtual_transport" in postfix and postfix.virtual_transport == "dovecot")
or postfix.ldap.enable or postfix.ldap.enable
%} %}
{# This applies when LDAP or dovecot are configured #}
smtpd_sasl_auth_enable = yes smtpd_sasl_auth_enable = yes
{% endif %} {% endif %}
{% if "virtual_transport" in postfix and postfix.virtual_transport == "dovecot" %} {% if ("virtual_transport" in postfix and postfix.virtual_transport == "dovecot")
and postfix.ldap.enable
%}
{# This applies when dovecot and LDAP are configured #}
dovecot_destination_recipient_limit = 1
virtual_transport = dovecot
{% endif %}
{% if ("virtual_transport" in postfix and postfix.virtual_transport == "dovecot")
and not postfix.ldap.enable
%}
{# This applies when dovecot is configured, but not LDAP #}
smtpd_sasl_type = dovecot smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth smtpd_sasl_path = private/auth
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
dovecot_destination_recipient_limit = 1 dovecot_destination_recipient_limit = 1
virtual_transport = dovecot virtual_transport = dovecot
{% endif %} {% endif %}