How to use quota with dovecot

Robert Moskowitz rgm at htt-consult.com
Sun Apr 9 08:03:37 EEST 2017


Oh, if you want to see my mods to base Dovecot that includes quota 
support, check out:

http://medon.htt-consult.com/Centos7-mailserver.html#Configuring%20Dovecot

I is based on what I am currently running that I learned from:

http://www.campworld.net/thewiki/pmwiki.php/LinuxServersCentOS/Cent6VirtMailServer


On 04/09/2017 12:16 AM, Robert Moskowitz wrote:
>
>
> On 04/08/2017 04:46 AM, Mik J wrote:
>> Hello,
>>
>> I would like to use quotas with dovecot and things are not clear to me.
>>
>> I read this page
>> https://wiki2.dovecot.org/Quota
>>
>>
>> 1) I did this
>>
>> # ls /usr/local/lib/dovecot/lib10_quota_plugin.so 
>> /usr/local/lib/dovecot/lib10_quota_plugin.so
>> # grep mail_plugins /etc/dovecot/conf.d/10-mail.conf mail_plugins = 
>> notify replication quota
>
> In 10-mail, mail_plugins is a global variable.  All you are doing here 
> is setting it.  Or that is my reading.  Of course this variable is 
> then used in the protocols.
>
>> Then the page tells about 20-imap.conf but an explanation is written
>>
>> # Space separated list of plugins to load (default is global 
>> mail_plugins).
>> So what is that default global mail_plugins ? Is it the one coming 
>> from 10-mail.conf ?
>
> Yes.   null unless you set it, as you did in 10-mail.  BTW, I set it 
> in local.conf instead of modifying 10-mail.conf.
>
>> 2) I tried both use this mail_plugins = $mail_plugins quota in 
>> 20-imap.conf or comment it.
>> And restarted dovecot each time
>
> in 20-imap.conf, it is a protocol:
>
> So you have enabled quota for protocol imap only.  You have already 
> defined the global variable mail_plugins so adding it here does 
> nothing more.  Do you have pop3 users?  If so you need to modify 
> 20-pop3.conf as well.  And I think you need to add it to 15-lda.conf.
>
> And what about imap_quota, do you need that plugin?
>
>
>
>> Then commented out in 90-quota.conf
>> quota_rule = *:storage=1G
>> quota_rule2 = Trash:storage=+100M
>> quota_grace = 10%%
>> }
>
> I use a mysql query.
>
>>
>> But I have this message
>> # doveadm quota recalc -u user at mydomain.org
>> doveadm(user at mydomain.org): Error: Quota not enabled
>>
>> Does anyone knows why ?
>>
>



More information about the dovecot mailing list