diff --git a/README.md b/README.md index 8ee1e75..239a769 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,9 @@ mynetworks: [] # Postfix is the destination for the domains listed here mydestination: [] + +# Check quota with dovecot at 127.0.0.1:12340 +check_dovecot_quota: false ``` **postfixmaps** diff --git a/defaults/main.yml b/defaults/main.yml index 4f10eb0..7178fc1 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -34,5 +34,6 @@ postfix: result_attributes: aliases: mailForwardingAddress mailboxes: mailMessageStore + check_dovecot_quota: false postfixmaps: [] diff --git a/templates/main.cf.j2 b/templates/main.cf.j2 index ba70997..398ce1f 100644 --- a/templates/main.cf.j2 +++ b/templates/main.cf.j2 @@ -77,6 +77,9 @@ smtpd_recipient_restrictions = permit_mynetworks, reject_unknown_recipient_domain, reject_unauth_destination, reject_non_fqdn_recipient, + {% if postfix.check_dovecot_quota -%} + check_policy_service inet:127.0.0.1:12340, + {% endif -%} permit {% if ("mailbox_transport" in postfix and postfix.mailbox_transport == "dovecot")