[Dovecot] default mail quota when using per user quota

Timo Sirainen tss at iki.fi
Sat Apr 21 00:18:24 EEST 2012


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).



More information about the dovecot mailing list