can't get quota working. I use static userdb driver.

Вадим Бажов master at remort.net
Wed Sep 6 13:17:34 EEST 2017


Thank you for your answers.
I fixed config to:

plugin {
  sieve_default = /mnt/rw_disc/dovecot/sieve/default.sieve
  sieve_global = /mnt/rw_disc/dovecot/sieve/

  quota = maildir:User
  quota_rule = *:storage=10M
#  quota_rule2 = INBOX.Trash:storage=+10%%
  quota_max_mail_size = 3M
  quota_exceeded_message = "552 5.2.2 Mailbox is full"
}

The mail_location is actually maildir:/var/spool/mail/%u, mdbox was a
misspelling (i tried migration from maildir to mdbox before).
I've deleted mailboxes from file system. Dovecot created them again on
login. I sent some mails to get over 10Mb in both mailboxes.

Quota still cant'be calculated.

# doveadm quota recalc -u vadim
# doveadm quota get -u vadim
Quota name Type    Value Limit

        %
User       STORAGE     0 10240

        0
User       MESSAGE     0     -

# du -sh /var/mail/vadim/
14M /var/mail/vadim/

doveconf -n is in attachement.

Thunderbird has a quota plugin and shows quota on the box from my
corporate mailbox and doesn't show quota on my testing installation at
all. Screenshots are attached too.


2017-09-05 13:49 GMT+05:00 Aki Tuomi <aki.tuomi at dovecot.fi>:
>
>
> On 05.09.2017 11:28, Steffen Kaiser wrote:
>> On Fri, 1 Sep 2017, Вадим Бажов wrote:
>>
>> > plugin {
>> >  quota = maildir:"User quota"
>> >  quota_rule = *:storage=10M
>> >  quota_rule3 = INBOX.Trash:storage=+10%%
>>             ^^ this should spell quota_rule2
>> but is not the issue right now
>>
>
> actually dovecot probably stops looking after it fails to see quota_rule2.
>
> Aki
-------------- next part --------------
# 2.2.27 (c0f36b0): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
# OS: Linux 2.6.32-696.6.3.ics.x86_64 x86_64 Ideco ICS ext4
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain login cram-md5
auth_verbose = yes
auth_verbose_passwords = yes
listen = 169.254.252.252
lmtp_rcpt_check_quota = yes
login_trusted_networks = 127.0.0.1
mail_debug = yes
mail_location = maildir:/var/spool/mail/%u
mail_plugins = quota
maildir_very_dirty_syncs = yes
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 index ihave duplicate mime foreverypart extracttext
namespace {
  inbox = yes
  location = 
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox Spam {
    auto = subscribe
    autoexpunge = 1 days
    special_use = \Junk
  }
  mailbox Trash {
    auto = subscribe
    autoexpunge = 1 days
    special_use = \Trash
  }
  prefix = INBOX.
  separator = .
  type = public
}
passdb {
  args = /usr/bin/dovecot-firebird-auth-handler.sh =%r =%u =%w
  driver = checkpassword
}
plugin {
  quota = maildir:User
  quota_exceeded_message = 552 5.2.2 Mailbox is full
  quota_max_mail_size = 3M
  quota_rule = *:storage=10M
  sieve_default = /mnt/rw_disc/dovecot/sieve/default.sieve
  sieve_global = /mnt/rw_disc/dovecot/sieve/
}
quota_full_tempfail = yes
service auth {
  group = 
  user = 
}
service imap-login {
  inet_listener imap-roundcube {
    address = 127.0.0.1
    port = 144
  }
  inet_listener imap {
    address = 0.0.0.0
    port = 143
  }
  inet_listener imaps {
    port = 0
  }
}
service pop3-login {
  inet_listener pop3 {
    address = 0.0.0.0
    port = 110
  }
  inet_listener pop3s {
    address = 0.0.0.0
    port = 995
  }
}
ssl_cert = </mnt/rw_disc/courier_certs/imapd_crt.pem
ssl_cipher_list = EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
ssl_key =  # hidden, use -P to show it
ssl_prefer_server_ciphers = yes
ssl_protocols = !SSLv2 !SSLv3
userdb {
  args = uid=imap gid=mail
  driver = static
}
protocol lmtp {
  mail_plugins = quota sieve
  postmaster_address = postmaster
}
protocol lda {
  mail_plugins = quota sieve
}
protocol imap {
  mail_plugins = quota imap_quota
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noquota.jpg
Type: image/jpeg
Size: 1674 bytes
Desc: not available
URL: <https://dovecot.org/pipermail/dovecot/attachments/20170906/0b423f72/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: quota.jpg
Type: image/jpeg
Size: 2354 bytes
Desc: not available
URL: <https://dovecot.org/pipermail/dovecot/attachments/20170906/0b423f72/attachment-0001.jpg>


More information about the dovecot mailing list