Quota warning invoked twice when moving messages to Trash folder
Dan Conway
darkc0de at archnix6.net
Tue Apr 20 20:32:00 EEST 2021
Hello all,
I currently have quota warnings enabled through the following
configuration on Dovecot 2.2.19:
plugin {
quota = dict:User quota::file:%h/Maildir/dovecot-quota
quota_warning = storage=100%% quota-warning 100 %u
%{userdb:quota_rule} %i
quota_warning2 = storage=95%% quota-warning 95 %u %{userdb:quota_rule} %i
quota_warning3 = storage=90%% quota-warning 90 %u %{userdb:quota_rule} %i
}
service quota-warning {
executable = script /usr/local/bin/quota-warning.pl
group = mailusers
unix_listener quota-warning {
group = mailusers
mode = 0775
}
}
When using Thunderbird as a client for testing, I fill up an inbox until
one of the warnings is invoked. (90%).
The script runs, and the mailbox sits at about 93%.
When moving a handful of messages to the Trash folder, the 100%
quota-warning service is invoked. But getting the quota through 'doveadm
quota get -u user' yields that same 93% used.
I ran strace on the main process that is taking in IMAP commands from
the Thunderbird client. Two lines are worth noting from that output:
134 uid store 2311:2312,2314:2317 +Flags (\\Seen)\r\n", 3619
137 uid move 2311:2312,2314:2317 \"INBOX.Trash\"\r\n", 3553
The first line sets the "Seen" flag on a list of messages, while the
second line moves the messages to the "INBOX.Trash" folder.
My guess as to what is happening is when the "uid move" command is
received, The messages are copied first, then removed from the server,
causing the quota to spike for a very short amount of time. Are those
suspicions correct? After looking at RFC 6851, Section 3.3 (Semantics of
MOVE and UID MOVE), it states: "Each message included in the set is
moved, rather than copied ... ". Any idea why the spike in quota usage
occurs?
Thanks.
More information about the dovecot
mailing list