Hello! Dovecot v2.3.13. Full, but anonymized, `doveconf -n` attached.
We are in the process of migrating maildir-backed users from filesystem quotes, to using dovecot's "count" quota backend. This is not reflected in the doveconf output because we're overriding `quota`, `quota_rule` and `quota_vsizes` in userdb: {"quota":"count:User quota","quota_rule":"*:storage=15G","quota_vsizes":"yes"} Afterwards, for a couple users, we received reports that mail delivery had failed because they were over quota. When looking into it for a specific user, we noticed that the vsize reported for a particular folder (with 47k messages) was reported as being nearly 50 times larger than it's on-disk size: root@mail02:~# doveadm mailbox status -u anonymized_user 'messages recent unseen vsize' 'anonymized/folder/name' [...] anonymized/folder/name messages=47338 recent=0 unseen=0 vsize=14335366070 However, the filesystem itself reports a much smaller size (but correct message count): root@mail02:~# du -hd1 /home/anonymized_user/Maildir/.anonymized.folder.name/ 313M /home/anonymized_user/Maildir/.anonymized.folder.name/cur 36K /home/anonymized_user/Maildir/.anonymized.folder.name/tmp 4.0K /home/anonymized_user/Maildir/.anonymized.folder.name/new 320M /home/anonymized_user/Maildir/.anonymized.folder.name/ root@mail02:~# ls /home/anonymized_user/Maildir/.anonymized.folder.name/cur | wc -l 47338 I have tried: - `doveadm force-resync -u anonymized_user` - deleting the index files in the specific folder, and running `doveadm index -u anonymized_user '*'` as well as `doveadm mailbox status -u anonymized_user vsize '*'` - deleting all `*index*` files in maildir, and running `doveadm index -u anonymized_user '*'` as well as `doveadm mailbox status -u anonymized_user vsize '*'` - comparing all maildir-sizes (S=) with their actual sizes to see if there are discrepancies. There are none. - regardless of the above, set `maildir_broken_filename_sizes = yes`, deleted indexes and reindexed. Even after deleting the list index (dovecot.list.index) as well as the mailbox indexes, recalculating the vsize seems very quick so I feel like the incorrect vsize is being fetched from a cache somewhere instead of being recalculated..? Any idea what is causing dovecot to report this wildly incorrect mailbox size? Are there any other files (not matching `*index*`) that are responsible? I'd rather not touch the user's control files, for obvious reasons. On a side note: We're also experiencing some issues with `mail_vsize_bg_after_count`. It seems to work correctly by returning a temporary error and deferring to a background job, but the indexer-worker job often times never appears to start (or do anything) at all: dovecot 29622 0.0 0.0 4120 1124 ? S 15:22 0:00 dovecot/indexer [0 clients, 0 requests] 266248 29623 0.0 0.0 6008 4604 ? S 15:22 0:00 dovecot/indexer-worker [idling] Waiting a while, and attempting to refetch the quota returns the same temperror with no indexer-worker being started. However, this is a separate issue from the above and can be ignored for now. Best regards, Eirik Rye
# 2.3.13 (89f716dc2): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.13 (cdd19fe3) # OS: Linux 4.19.0-14-amd64 x86_64 Debian 10.8 debug_log_path = /var/log/dovecot.log default_vsz_limit = 768 M disable_plaintext_auth = no imap_id_log = * info_log_path = /var/log/dovecot.log lmtp_add_received_header = no lmtp_hdr_delivery_address = none log_path = /var/log/dovecot.err log_timestamp = "%FT%T%z " login_greeting = %{hostname} ready. login_log_format_elements = user=<%u> orig=<%{orig_user}> method=%m proto=%s rip=%r lip=%l session=<%{session}> %c %k mail_fsync = always mail_location = maildir:~/Maildir mail_nfs_index = yes mail_nfs_storage = yes mail_plugins = quota mail_vsize_bg_after_count = 500 maildir_broken_filename_sizes = yes managesieve_sieve_capability = fileinto envelope encoded-character subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body environment mailbox date index ihave duplicate mime foreverypart extracttext mmap_disable = yes namespace inbox { inbox = yes location = mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Sent { auto = subscribe special_use = \Sent } mailbox "Sent Messages" { auto = no special_use = \Sent } mailbox Spam { auto = create special_use = \Junk } mailbox Trash { auto = subscribe special_use = \Trash } prefix = separator = / } passdb { args = /etc/dovecot/dovecot-redis-alias.conf.ext driver = dict name = redis-alias override_fields = noauthenticate username_filter = *@* } passdb { args = /etc/dovecot/dovecot-redis-deny.conf.ext deny = yes driver = dict name = redis-deny } passdb { args = /etc/dovecot/dovecot-redis.conf.ext auth_verbose = yes driver = dict name = redis-auth } plugin { quota = fs:User quota sieve = file:~/sieve;active=~/.dovecot.sieve sieve_extensions = -vacation -reject -enotify -ereject sieve_max_redirects = 0 } protocols = imap pop3 lmtp sieve quota_full_tempfail = yes service doveadm { inet_listener { port = 24245 } inet_listener http { port = 8080 } } service imap-login { client_limit = 2048 inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes } process_limit = 8 process_min_avail = 8 service_count = 0 vsz_limit = 768 M } service imap { client_limit = 1 process_limit = 32768 } service lmtp { inet_listener lmtp { port = 24 } } service pop3-login { client_limit = 2048 inet_listener pop3 { port = 110 } inet_listener pop3s { port = 995 ssl = yes } process_limit = 8 process_min_avail = 2 service_count = 0 } service pop3 { process_limit = 16384 } service stats { client_limit = 32768 inet_listener http { port = 9900 } } ssl_cert = </etc/dovecot/wildcard.crt ssl_cipher_list = ALL:!LOW:!SSLv2:!EXP:!aNULL ssl_dh = # hidden, use -P to show it ssl_key = # hidden, use -P to show it submission_host = 127.0.0.1:25 userdb { args = /etc/dovecot/dovecot-redis.conf.ext driver = dict name = redis } verbose_proctitle = yes protocol lmtp { mail_plugins = quota sieve } protocol lda { mail_plugins = quota sieve } protocol imap { mail_max_userip_connections = 25 mail_plugins = quota imap_quota last_login } protocol pop3 { mail_plugins = quota last_login }