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 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 ? 2) I tried both use this mail_plugins = $mail_plugins quota in 20-imap.conf or comment it. And restarted dovecot each time Then commented out in 90-quota.conf quota_rule = *:storage=1G quota_rule2 = Trash:storage=+100M quota_grace = 10%% } 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 ?
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 quotaIn 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 timein 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 ? >
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 ? >> >
On Saturday, April 8, 2017 9:47 AM, Mik J <mikydevel at yahoo.fr> wrote:> Then commented out in 90-quota.conf > >quota_rule = *:storage=1G > >quota_rule2 = Trash:storage=+100M > >quota_grace = 10%% > >}You also need to define what type of quota do you want, dict-based, maildir based, static (same quota for all)... Figure out what quota you want then add the missing "quota=" line. I configured maildir based quotas and the line looks like this on my config file : 90-quota.conf: quota = maildir:User quota This will create and maintain a maildirsize file in the maildirs. Of course, this doesn't work for mboxes. -- Yassine.
Hello,Thank you to both of you for your answers.I just use imap.I'm going to look at your examples and 15-lda.confHave a nice week Le Dimanche 9 avril 2017 17h44, chaouche yacine <yacinechaouche at yahoo.com> a ?crit : On Saturday, April 8, 2017 9:47 AM, Mik J <mikydevel at yahoo.fr> wrote:> Then commented out in 90-quota.conf > >quota_rule = *:storage=1G > >quota_rule2 = Trash:storage=+100M > >quota_grace = 10%% > >}You also need to define what type of quota do you want, dict-based, maildir based, static (same quota for all)... Figure out what quota you want then add the missing "quota=" line. I configured maildir based quotas and the line looks like this on my config file : 90-quota.conf: quota = maildir:User quota This will create and maintain a maildirsize file in the maildirs. Of course, this doesn't work for mboxes. ? -- Yassine.