Hello,
on a system I administer the disk where Dovecot's mailstore (mdbox) resides got filled up to the brim although the combined quotas for the users are much smaller than the disk's capacity.
For one user I see the following:
doveadm quota get -u <USER>@<DOMAIN> Username Quota name Type Value Limit % <USER>@<DOMAIN> User quota STORAGE 10231248 20971520 48 <USER>@<DOMAIN> User quota MESSAGE 11176 - 0
So this user has used ~10G of his 20G quota. But looking at the space used on disk:
# du -hs /var/spool/vmail/mail/<DOMAIN>/<USER>/storage/ 90G /var/spool/vmail/mail/<DOMAIN>/<USER>/storage/
What might be the reason that mail size and disk space used differ so much? And most of all: how can I prevent that from happening?
Regards mks
# doveconf -n # 2.3.13 (89f716dc2): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.13 (cdd19fe3) # OS: Linux 4.19.0-13-amd64 x86_64 Debian 10.7 ext4 # Hostname: … auth_mechanisms = plain login dict { quota = pgsql:/etc/dovecot/dovecot-dict-sql.conf.ext } imap_id_log = * login_log_format_elements = user=<%u> method=%m rip=%r lip=%l lport=%a mpid=%e %c mail_home = /var/spool/vmail/home/%d/%n mail_location = mdbox:/var/spool/vmail/mail/%d/%n mail_plugins = " quota acl" 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 { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Entwürfe { special_use = \Drafts } mailbox Entw&APw-rfe { special_use = \Drafts } mailbox "Gelöschte Objekte" { special_use = \Trash } mailbox "Gel&APY-schte Objekte" { special_use = \Trash } mailbox "Gesendete Objekte" { special_use = \Sent } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = separator = / } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { acl = vfile mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename mail_log_fields = uid box msgid size quota = dict:User quota::proxy::quota recipient_delimiter = + sieve = file:~/sieve;active=~/.dovecot.sieve sieve_redirect_envelope_from = orig_recipient } protocols = " imap lmtp sieve" service auth-worker { user = $default_internal_user } service auth { inet_listener { port = 12345 } unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } } service dict { unix_listener dict { group = vmail mode = 0600 user = vmail } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0600 user = postfix } } service stats { client_limit = 10000 unix_listener stats-writer { group = vmail user = vmail } } ssl_cert =
On 29/01/2021 12:41 Markus Schönhaber dovecot@list-post.mks-mail.de wrote:
Hello,
on a system I administer the disk where Dovecot's mailstore (mdbox) resides got filled up to the brim although the combined quotas for the users are much smaller than the disk's capacity.
For one user I see the following:
doveadm quota get -u <USER>@<DOMAIN> Username Quota name Type Value Limit % <USER>@<DOMAIN> User quota STORAGE 10231248 20971520 48 <USER>@<DOMAIN> User quota MESSAGE 11176 - 0
So this user has used ~10G of his 20G quota. But looking at the space used on disk:
# du -hs /var/spool/vmail/mail/<DOMAIN>/<USER>/storage/ 90G /var/spool/vmail/mail/<DOMAIN>/<USER>/storage/
What might be the reason that mail size and disk space used differ so much? And most of all: how can I prevent that from happening?
Regards mks
# doveconf -n # 2.3.13 (89f716dc2): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.13 (cdd19fe3) # OS: Linux 4.19.0-13-amd64 x86_64 Debian 10.7 ext4 # Hostname: … auth_mechanisms = plain login dict { quota = pgsql:/etc/dovecot/dovecot-dict-sql.conf.ext } imap_id_log = * login_log_format_elements = user=<%u> method=%m rip=%r lip=%l lport=%a mpid=%e %c mail_home = /var/spool/vmail/home/%d/%n mail_location = mdbox:/var/spool/vmail/mail/%d/%n mail_plugins = " quota acl" 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 { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Entwürfe { special_use = \Drafts } mailbox Entw&APw-rfe { special_use = \Drafts } mailbox "Gelöschte Objekte" { special_use = \Trash } mailbox "Gel&APY-schte Objekte" { special_use = \Trash } mailbox "Gesendete Objekte" { special_use = \Sent } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = separator = / } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { acl = vfile mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename mail_log_fields = uid box msgid size quota = dict:User quota::proxy::quota recipient_delimiter = + sieve = file:~/sieve;active=~/.dovecot.sieve sieve_redirect_envelope_from = orig_recipient } protocols = " imap lmtp sieve" service auth-worker { user = $default_internal_user } service auth { inet_listener { port = 12345 } unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } } service dict { unix_listener dict { group = vmail mode = 0600 user = vmail } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0600 user = postfix } } service stats { client_limit = 10000 unix_listener stats-writer { group = vmail user = vmail } } ssl_cert =
mdbox format requires you to periodically run
doveadm purge -u user
to cleanup deleted mails from the mdbox storage. mdbox has feature that you can use mail_location mdbox_deleted to access any deleted emails if you need to recover them, but it also requires you to purge the storage now and then.
Aki
29.01.21 11:46 +0100, Aki Tuomi:
On 29/01/2021 12:41 Markus Schönhaber dovecot@list-post.mks-mail.de wrote:
Hello,
on a system I administer the disk where Dovecot's mailstore (mdbox) resides got filled up to the brim although the combined quotas for the users are much smaller than the disk's capacity.
For one user I see the following:
doveadm quota get -u <USER>@<DOMAIN> Username Quota name Type Value Limit % <USER>@<DOMAIN> User quota STORAGE 10231248 20971520 48 <USER>@<DOMAIN> User quota MESSAGE 11176 - 0
So this user has used ~10G of his 20G quota. But looking at the space used on disk:
# du -hs /var/spool/vmail/mail/<DOMAIN>/<USER>/storage/ 90G /var/spool/vmail/mail/<DOMAIN>/<USER>/storage/
What might be the reason that mail size and disk space used differ so much? And most of all: how can I prevent that from happening?
mdbox format requires you to periodically run
doveadm purge -u user
to cleanup deleted mails from the mdbox storage. mdbox has feature that you can use mail_location mdbox_deleted to access any deleted emails if you need to recover them, but it also requires you to purge the storage now and then.
Thanks for your answer, Aki! I will configure a cron-job to purge the user's mailstore.
Nevertheless, since this is a very low volume server and the user in question only sends and receives a few dozen mails, weighing a hand full of MB, per day, I'm at a loss to understand how it's possible that in the user's mailstore 80G of deleted but not purged mail can pile up in just about a week(!). This has happend a couple of times during the last month. And after it happened the last time (8 days ago), I had manually purged the user's mailstore reducing ist's size back to the ~10G that are reasonable. Since then it has grown to the 90G I mentioned above.
So, if you have any idea what to check or what measures to take to help me find out what's happening there, that woud be great! I'll start to log the mailstore size regularly to be able follow the growth over time but maybe there's something I could tell Dovecot to do...
-- Regards mks
On 29/01/2021 13:24 Markus Schönhaber dovecot@list-post.mks-mail.de wrote:
29.01.21 11:46 +0100, Aki Tuomi:
On 29/01/2021 12:41 Markus Schönhaber dovecot@list-post.mks-mail.de wrote:
Hello,
on a system I administer the disk where Dovecot's mailstore (mdbox) resides got filled up to the brim although the combined quotas for the users are much smaller than the disk's capacity.
For one user I see the following:
doveadm quota get -u <USER>@<DOMAIN> Username Quota name Type Value Limit % <USER>@<DOMAIN> User quota STORAGE 10231248 20971520 48 <USER>@<DOMAIN> User quota MESSAGE 11176 - 0
So this user has used ~10G of his 20G quota. But looking at the space used on disk:
# du -hs /var/spool/vmail/mail/<DOMAIN>/<USER>/storage/ 90G /var/spool/vmail/mail/<DOMAIN>/<USER>/storage/
What might be the reason that mail size and disk space used differ so much? And most of all: how can I prevent that from happening?
mdbox format requires you to periodically run
doveadm purge -u user
to cleanup deleted mails from the mdbox storage. mdbox has feature that you can use mail_location mdbox_deleted to access any deleted emails if you need to recover them, but it also requires you to purge the storage now and then.
Thanks for your answer, Aki! I will configure a cron-job to purge the user's mailstore.
Nevertheless, since this is a very low volume server and the user in question only sends and receives a few dozen mails, weighing a hand full of MB, per day, I'm at a loss to understand how it's possible that in the user's mailstore 80G of deleted but not purged mail can pile up in just about a week(!). This has happend a couple of times during the last month. And after it happened the last time (8 days ago), I had manually purged the user's mailstore reducing ist's size back to the ~10G that are reasonable. Since then it has grown to the 90G I mentioned above.
So, if you have any idea what to check or what measures to take to help me find out what's happening there, that woud be great! I'll start to log the mailstore size regularly to be able follow the growth over time but maybe there's something I could tell Dovecot to do...
-- Regards mks
Using mail_log plugin is always very recommended,
https://doc.dovecot.org/configuration_manual/plugins/mail_event_logging/
Aki
29.01.21, 12:32 +0100, Aki Tuomi:
On 29/01/2021 13:24 Markus Schönhaber dovecot@list-post.mks-mail.de wrote:
Nevertheless, since this is a very low volume server and the user in question only sends and receives a few dozen mails, weighing a hand full of MB, per day, I'm at a loss to understand how it's possible that in the user's mailstore 80G of deleted but not purged mail can pile up in just about a week(!). This has happend a couple of times during the last month. And after it happened the last time (8 days ago), I had manually purged the user's mailstore reducing ist's size back to the ~10G that are reasonable. Since then it has grown to the 90G I mentioned above.
So, if you have any idea what to check or what measures to take to help me find out what's happening there, that woud be great! I'll start to log the mailstore size regularly to be able follow the growth over time but maybe there's something I could tell Dovecot to do...
Using mail_log plugin is always very recommended,
https://doc.dovecot.org/configuration_manual/plugins/mail_event_logging/
OK, I'll turn that on. Thanks again for your help!
-- Regards mks
participants (2)
-
Aki Tuomi
-
Markus Schönhaber