21 Apr
2012
21 Apr
'12
12:18 a.m.
On 20.4.2012, at 14.11, Andreas Helmcke wrote:
using dovecot 2.1 and per user mail quota via ldap is there a way to have a default quota which gets used, if the "quota" field in ldap is not set?
By "not set" you mean it doesn't exist at all, or it exists but is empty?
I tried with:
plugin { quota = maildir:User quota quota_rule = *:storage=3G }
userdb { args = /etc/dovecot/dovecot-ldap.conf driver = ldap }
and in dovecot-ldap.conf: user_attrs = dcMailQuota=quota_rule=*:storage=%$
If dcMailQuota isn't returned, then the global quota_rule is used. If it is returned as empty, I guess it gets treated as unlimited quota. There's currently no easy way avoid this (a difficult way could be e.g. post-login scripting, but that works only for imap/pop3).