Hi Friends,
a doubt:
I would like to enable (the same) quota (count) for all (virtual)users, on Debian Stretch, Postfix 3.1.8, Dovecot 2.2.27, and is not clear for me if I need to tell Postfix to communicate with the service in /etc/postfix/main.cf as here:
smtpd_recipient_restrictions = ... check_policy_service inet:mailstore.example.com:12340
My current Postfix "smtpd_recipient_restrictions":
-o smtpd_recipient_restrictions=reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject
Currently I've edited:
conf.d/10-mail.conf:
# Space separated list of plugins to load for all services. Plugins specific to # IMAP, LDA, etc. are added to this list in their own .conf files. mail_plugins = $mail_plugins quota
conf.d/20-imap.conf:
protocol imap { # Space separated list of plugins to load (default is global mail_plugins). mail_plugins = $mail_plugins imap_quota }
conf.d/90-quota.conf: (for use with the quota-status service)
plugin { quota_grace = 10%% # 10% is the default quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full" }
/etc/dovecot/conf.d/90-quota.conf:
plugin { quota = maildir quota_rule = *:storage=3G quota_rule2 = Trash:storage=+100M # LDA/LMTP allows saving the last mail to bring user from under quota to # over quota, if the quota doesn't grow too high. Default is to allow as # long as quota will stay under 10% above the limit. Also allowed e.g. 10M. #quota_grace = 10%% # 10% is the default quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full" } plugin { quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=80%% quota-warning 80 %u } plugin { #quota = dirsize:User quota #quota = maildir:User quota #quota = dict:User quota::proxy::quota #quota = fs:User quota quota = count:User quota # This is required - it uses "virtual sizes" rather than "physical sizes" for quota counting: quota_vsizes = yes } plugin { #quota = dict:user::proxy::quota #quota2 = dict:domain:%d:proxy::quota_domain #quota_rule = *:storage=102400 #quota2_rule = *:storage=1048576 } service quota-warning { executable = script /usr/local/bin/quota-warning.sh user = dovecot unix_listener quota-warning { user = vmail } } service quota-status { executable = quota-status -p postfix inet_listener { port = 12340 # You can choose any port you want } client_limit = 1 }
Many many thanks!!
Davide