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
- 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 ?
- 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@mydomain.org doveadm(user@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
- 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.
- 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@mydomain.org doveadm(user@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/Cent6VirtMail...
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
- 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.
- 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@mydomain.org doveadm(user@mydomain.org): Error: Quota not enabled
Does anyone knows why ?
On Saturday, April 8, 2017 9:47 AM, Mik J mikydevel@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@yahoo.com> a écrit :
On Saturday, April 8, 2017 9:47 AM, Mik J mikydevel@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.
1
On 11.04.2017 13:36, Mik J wrote:
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@yahoo.com> a écrit :
On Saturday, April 8, 2017 9:47 AM, Mik J mikydevel@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.
Hi!
If you are using dovecot v2.2.19 or later, we recommend
mail_plugins = $mail_plugins quota # quota_clone
plugin { quota = count:User quota ## if you need to store it in some sql or something #quota_clone_dict = proxy::database quota_vsizes = true }
See https://wiki2.dovecot.org/Quota/Count and https://wiki2.dovecot.org/Plugins/QuotaClone
Advantage of quota clone is that it keeps quota tracking in index files and does not require dicts or any external files.
Aki
participants (4)
-
Aki Tuomi
-
chaouche yacine
-
Mik J
-
Robert Moskowitz