Discussion:
quota for subfolder with prefix=INBOX.
Jogi Hofmüller
2014-08-29 10:30:24 UTC
Permalink
Hi all,

We use prefix=INBOX. in order to keep things as they were on the old
server. Now I started playing with quota and have trouble getting the
additional quota for Trash and/or Junk working. My expectation was that
once a user is over quota and moves email to trash sh/e should be able
to receive new email again. That's what I cannot get to work with our
setup.

Attached you find the config that I thought should be working. The
numbers are ridiculously low but that's just for testing.

Here is some output from doveadm

doveadm quota get -u user
Quota name Type Value Limit %
User quota STORAGE 5422 5120 105
User quota MESSAGE 18 - 0

doveadm mailbox status -u user "messages vsize" "*"
INBOX messages=13 vsize=3147033

doveadm mailbox status -u user "messages vsize" "INBOX.*"
INBOX.Drafts messages=0 vsize=0
INBOX.Sent messages=0 vsize=0
INBOX.Trash messages=5 vsize=2475790
INBOX.Junk messages=0 vsize=0

Regards,
--
j.hofm?ller

We are all idiots with deadlines. - Mike West
-------------- next part --------------
# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 3.14-1-amd64 x86_64 Debian jessie/sid btrfs
auth_verbose = yes
disable_plaintext_auth = no
imapc_features = rfc822.size fetch-headers
imapc_host = hornet.mur.at
imapc_list_prefix = INBOX
imapc_master_user = cyrus
imapc_password = secret
imapc_port = 993
imapc_ssl = imaps
imapc_ssl_verify = no
imapc_user = %u
lmtp_proxy = yes
lmtp_save_to_detail_mailbox = yes
login_greeting = Dovecot is spitze!
mail_location = maildir:/srv/vmail/%n/Maildir
mail_plugins = " acl quota"
mail_prefetch_count = 20
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
namespace {
hidden = no
inbox = no
list = children
location = maildir:/srv/vmail/%%n/Maildir:INDEX=/srv/vmail/%n/shared/%%n:CONTROL=/srv/vmail/%n/shared/%%n:INDEXPVT=/srv/vmail/%n/shared/%%n
prefix = shared.%%n.
separator = .
subscriptions = yes
type = shared
}
namespace inbox {
hidden = no
ignore_on_failure = no
inbox = yes
list = yes
location =
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Junk {
auto = subscribe
special_use = \Junk
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
prefix = INBOX.
separator = .
subscriptions = yes
type = private
}
passdb {
args = /etc/dovecot/deny.%s
deny = yes
driver = passwd-file
}
passdb {
args = /etc/dovecot/dovecot-ldap.conf.ext
driver = ldap
}
plugin {
acl = vfile:/etc/dovecot/global-acls:cache_secs=300
acl_shared_dict = file:/var/lib/dovecot/db/shared-mailboxes.db
quota = maildir:User quota
quota_rule = *:storage=5M
quota_rule2 = INBOX.Trash:storage=+5M
quota_rule3 = INBOX.Junk:storage=+5M
sieve = /srv/vmail/%u/sieve/.dovecot.sieve
sieve_default = /srv/vmail/sieve/default.sieve
sieve_dir = /srv/vmail/%u/sieve
sieve_global_dir = /srv/vmail/sieve/
}
postmaster_address = postmaster at mur.at
protocols = " imap lmtp sieve pop3"
quota_full_tempfail = yes
service auth {
unix_listener auth-userdb {
group = vmail
mode = 0777
user = vmail
}
}
service lmtp {
inet_listener lmtp {
address = 172.16.16.78
port = 24
}
user = vmail
}
service managesieve-login {
inet_listener sieve {
port = 4190
}
inet_listener sieve_deprecated {
port = 2000
}
process_min_avail = 1
service_count = 1
vsz_limit = 64 M
}
service managesieve {
process_limit = 256
}
ssl_cert = </etc/dovecot/klee.pem
ssl_key = </etc/dovecot/private/klee.mur.at.pem
userdb {
args = /etc/dovecot/dovecot-ldap.conf.ext
driver = ldap
}
protocol lmtp {
mail_plugins = " acl quota sieve"
passdb {
args = /etc/dovecot/dovecot-ldap_for_lmtp.conf.ext
driver = ldap
name =
}
}
protocol imap {
mail_plugins = " acl quota imap_acl imap_quota"
}
protocol sieve {
managesieve_implementation_string = Dovecot Pigeonhole
}
protocol pop3 {
mail_plugins = " acl quota pop3_acl pop3_quota"
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20140829/c7cfd436/attachment-0001.sig>
Jogi Hofmüller
2014-09-02 12:26:18 UTC
Permalink
Hi all,

Since I did not manage to get quota for individual subfolders working I
tried toying with quota_grace, which also does not work for me :( My
approach was this:

plugin {
quota = maildir:User quota
quota_grace = 20%%
quota_rule = *:storage=5M

}

I expected normal delivery of email when user is at 103% quota but the
new email (even tiny ones with less than 1K) get's rejected with reason
'over quota'. Is this what dovecot is supposed to do or did I do
something wrong?

Regards,
--
j.hofm?ller

We are all idiots with deadlines. - Mike West

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20140902/118d577a/attachment.sig>
Jiri Bourek
2014-09-02 13:26:35 UTC
Permalink
Post by Jogi Hofmüller
Hi all,
Since I did not manage to get quota for individual subfolders working I
tried toying with quota_grace, which also does not work for me :( My
plugin {
quota = maildir:User quota
quota_grace = 20%%
quota_rule = *:storage=5M
}
I expected normal delivery of email when user is at 103% quota but the
new email (even tiny ones with less than 1K) get's rejected with reason
'over quota'. Is this what dovecot is supposed to do or did I do
something wrong?
Regards,
I think your question is answered by first sentence in
http://wiki2.dovecot.org/Quota/Configuration#Quota_grace
Jogi Hofmüller
2014-09-02 15:52:22 UTC
Permalink
Hi,
Post by Jiri Bourek
I think your question is answered by first sentence in
http://wiki2.dovecot.org/Quota/Configuration#Quota_grace
I guess I totally misunderstood the quota_grace option then. To be
clear: if the last mail brings the user just 1% over quota it doesn't
matter that I e.g. set quota_grace = 10 %% because every further email
will just be denied.

Too bad the extended quota for subfolders don't work in our setup (see
my initial email).

Cheers,
--
J.Hofm?ller

Nisiti - Abie Nathan, 1927-2008

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20140902/c2225e2b/attachment.sig>
Jiri Bourek
2014-09-02 20:04:22 UTC
Permalink
Post by Jogi Hofmüller
Hi,
Post by Jiri Bourek
I think your question is answered by first sentence in
http://wiki2.dovecot.org/Quota/Configuration#Quota_grace
I guess I totally misunderstood the quota_grace option then. To be
clear: if the last mail brings the user just 1% over quota it doesn't
matter that I e.g. set quota_grace = 10 %% because every further email
will just be denied.
Yes. The grace value only protects the system from receiving huge last
message.
Post by Jogi Hofmüller
Too bad the extended quota for subfolders don't work in our setup (see
my initial email).
Cheers,
Jogi Hofmüller
2014-09-03 15:05:41 UTC
Permalink
Hi,
Post by Jiri Bourek
Yes. The grace value only protects the system from receiving huge last
message.
Alright then, back to the $subject. Who has a clue on how to get
extended quota for subfolders working when using prefix=INBOX.?

Cheers,
--
J.Hofm?ller

Nisiti - Abie Nathan, 1927-2008

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20140903/0856579f/attachment.sig>
Loading...