add dovecot quota checking

This commit is contained in:
Morre 2020-09-26 13:45:35 +02:00
parent 3d42241819
commit 5e23cadfac
No known key found for this signature in database
GPG key ID: 5D9B9B1B8F424BBC
3 changed files with 7 additions and 0 deletions

View file

@ -64,6 +64,9 @@ mynetworks: []
# Postfix is the destination for the domains listed here # Postfix is the destination for the domains listed here
mydestination: [] mydestination: []
# Check quota with dovecot at 127.0.0.1:12340
check_dovecot_quota: false
``` ```
**postfixmaps** **postfixmaps**

View file

@ -34,5 +34,6 @@ postfix:
result_attributes: result_attributes:
aliases: mailForwardingAddress aliases: mailForwardingAddress
mailboxes: mailMessageStore mailboxes: mailMessageStore
check_dovecot_quota: false
postfixmaps: [] postfixmaps: []

View file

@ -77,6 +77,9 @@ smtpd_recipient_restrictions = permit_mynetworks,
reject_unknown_recipient_domain, reject_unknown_recipient_domain,
reject_unauth_destination, reject_unauth_destination,
reject_non_fqdn_recipient, reject_non_fqdn_recipient,
{% if postfix.check_dovecot_quota -%}
check_policy_service inet:127.0.0.1:12340,
{% endif -%}
permit permit
{% if ("mailbox_transport" in postfix and postfix.mailbox_transport == "dovecot") {% if ("mailbox_transport" in postfix and postfix.mailbox_transport == "dovecot")