[Dovecot] Quota calculation problem with 1.2 beta 4
Two of my users are reporting that their quota is not being recalculated ALTHOUGH they deleted lots and lots of mails.
I'm using today's hg checkout of 1.2 beta 4
-- Ralf Hildebrandt Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155 http://www.computerbeschimpfung.de Wen du nicht mit Können beeindrucken kannst, den verwirre mit Schwachsinn!
Ralf Hildebrandt schrieb:
Two of my users are reporting that their quota is not being recalculated ALTHOUGH they deleted lots and lots of mails.
I'm using today's hg checkout of 1.2 beta 4
Hi Ralf, did they report so , or is it real, sometimes users are failing with expunge options of their client
-- Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
On Wed, 1 Apr 2009, Robert Schetterer wrote:
Ralf Hildebrandt schrieb:
Two of my users are reporting that their quota is not being recalculated ALTHOUGH they deleted lots and lots of mails.
I'm using today's hg checkout of 1.2 beta 4
Hi Ralf, did they report so , or is it real, sometimes users are failing with expunge options of their client
Along a similar line: with 1.2 beta 4 I had today a user who according to deliver was over quota:
Apr 1 08:00:27 apollo dovecot: deliver(user1): sieve: msgid=20090401060005.0821B1E82B0@hostxxx: failed to store into mailbox 'INBOX': Quota exceeded (mailbox for user is full)
but the IMAP command reported correctly what I also found in the maildirsize file (in userdb the configured limit was 1000M, his actual INBOX size was below 600M):
1048576000S 557816894 10852
The relevant sections from dovecot.conf are
protocol imap { mail_plugins = quota imap_quota zlib acl imap_acl }
protocol lda { mail_plugins = sieve quota acl }
plugin { quota = maildir:Quota quota_rule = *:storage=500MB quota_rule2 = Trash:ignore }
With that config the quota for ALL users seems to be at 500M not taking into account userdb overrides. Or is that the effect of a wrong configuration, e.g. quota = maildir:Quota should become quota = maildir:User Quota ?
-- Wolfgang Friebel Deutsches Elektronen-Synchrotron DESY Phone/Fax: +49 33762 77372/216 Platanenallee 6 Mail: Wolfgang.Friebel AT desy.de D-15738 Zeuthen Germany
- Wolfgang.Friebel@desy.de Wolfgang.Friebel@desy.de:
Hi Ralf, did they report so , or is it real, sometimes users are failing with expunge options of their client
It's real. I checked the mailboxes and there were no messages marked deleted.
Along a similar line: with 1.2 beta 4 I had today a user who according to
deliver was over quota:Apr 1 08:00:27 apollo dovecot: deliver(user1): sieve:
msgid=20090401060005.0821B1E82B0@hostxxx: failed to store into mailbox
'INBOX': Quota exceeded (mailbox for user is full)but the IMAP command reported correctly what I also found in the
maildirsize file (in userdb the configured limit was 1000M, his actual
INBOX size was below 600M):1048576000S 557816894 10852
Yes, same here. The values in maildirsize are OK and match up with "du -s" numbers BUT imapd reports something different.
With that config the quota for ALL users seems to be at 500M not taking
into account userdb overrides.
Indeed. The users do have "speical" values in their maildirsize files
Or is that the effect of a wrong configuration, e.g. quota = maildir:Quota should become quota = maildir:User Quota ?
Ugh. Dunno. Timo? It used to work with 1.1.13!
-- Ralf Hildebrandt Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155 http://www.computerbeschimpfung.de Which fundamental human right do you want to give up today?
On Wed, 2009-04-01 at 13:42 +0200, Wolfgang.Friebel@desy.de wrote:
Along a similar line: with 1.2 beta 4 I had today a user who according to deliver was over quota:
Apr 1 08:00:27 apollo dovecot: deliver(user1): sieve: msgid=20090401060005.0821B1E82B0@hostxxx: failed to store into mailbox 'INBOX': Quota exceeded (mailbox for user is full)
but the IMAP command reported correctly what I also found in the maildirsize file (in userdb the configured limit was 1000M, his actual INBOX size was below 600M):
Are you calling deliver with -d parameter? If not, the userdb lookup is not done in that case. If you are, set mail_debug=yes and paste the logs when this happens.
On Wed, 1 Apr 2009, Timo Sirainen wrote:
but the IMAP command reported correctly what I also found in the maildirsize file (in userdb the configured limit was 1000M, his actual INBOX size was below 600M):
Are you calling deliver with -d parameter? If not, the userdb lookup is not done in that case. If you are, set mail_debug=yes and paste the logs when this happens.
I did not call deliver with the -d parameter. I just added that right now
From the Wiki page that describes deliver I did not correctly interpret what are the consequences of "-d <username>: Destination username. If given, the user information is looked up from dovecot-auth"
It would be nice if one of the pages LDA, LDA/Postfix or Quota wiki pages did explicitely mention that fact
Thanks a lot for your help
Wolfgang Friebel Deutsches Elektronen-Synchrotron DESY Phone/Fax: +49 33762 77372/216 Platanenallee 6 Mail: Wolfgang.Friebel AT desy.de D-15738 Zeuthen Germany
On Wed, 1 Apr 2009, Wolfgang.Friebel@desy.de wrote:
On Wed, 1 Apr 2009, Timo Sirainen wrote:
but the IMAP command reported correctly what I also found in the maildirsize file (in userdb the configured limit was 1000M, his actual INBOX size was below 600M):
Are you calling deliver with -d parameter? If not, the userdb lookup is not done in that case. If you are, set mail_debug=yes and paste the logs when this happens.
I did not call deliver with the -d parameter. I just added that right now
Sorry for the trouble. I did recheck that I already had called deliver using -d ${recipient}. That seems not to be the problem.
I made several experiments with quota settings and userdb while mail_debug was on. Here are my findings:
After changing /etc/userdb and modifying my userdb_quota_rule=*:storage=200M with an editor the IMAP GETQUOTAROOT does immediately report the changed value. The ~user/Maildir/maildirsize content does however not change and according to the maillog output the quota calculation is done based on the contents of that file.
If I do delete that file after changing the contents of the users INBOX the file gets regenerated with the contents from the quota rule (i.e. 900MB, see below) and not with the value from the userdb (200M)
If then I do another IMAP GETQUOTAROOT the correct value is reported again (200M) and the contents of ~user/Maildir/maildirsize is changed to that value as well.
This is however not the only finding. I manipulated further my userdb quota and did set it to 90MB. Shortly after that another user (Quota 900MB) received a mail. The debug output for that mail delivery:
dovecot: deliver(user2): Quota warning: bytes=89653 2480 (95%)...
indicates that my settings were used instead for quota calculation. The maildirsize content for that user was however still at 900MB, not 90MB.
I am now puzzled what should happen when and whether I am looking to the correct indicators for problems. I could make the log file available, I would however prefer to generate a logfile where I get told what to try in what order to get more information from that logfile.
It could be that the bug is somewhere in my config, which I do post again for reference (excerpt), but I cannot see what might be wrong with it.
protocol imap { mail_plugins = quota imap_quota zlib acl imap_acl }
protocol lda { mail_plugins = sieve quota acl } auth default { mechanisms = gssapi gss-spnego login plain passdb pam { } userdb passwd-file { args = /etc/userdb } user = root } plugin { quota = maildir:Quota quota_rule = *:storage=900MB quota_rule2 = Trash:ignore }
-- Wolfgang Friebel Deutsches Elektronen-Synchrotron DESY Phone/Fax: +49 33762 77372/216 Platanenallee 6 Mail: Wolfgang.Friebel AT desy.de D-15738 Zeuthen Germany
On Thu, 2009-04-02 at 12:18 +0200, Wolfgang.Friebel@desy.de wrote:
I made several experiments with quota settings and userdb while mail_debug was on. Here are my findings:
After changing /etc/userdb and modifying my userdb_quota_rule=*:storage=200M with an editor the IMAP GETQUOTAROOT does immediately report the changed value. The ~user/Maildir/maildirsize content does however not change and according to the maillog output the quota calculation is done based on the contents of that file.
The limits in maildirsize file are ignored by Dovecot as long as you defined quota_rules. So don't bother looking at them.
If I do delete that file after changing the contents of the users INBOX the file gets regenerated with the contents from the quota rule (i.e. 900MB, see below) and not with the value from the userdb (200M)
Then it means that Dovecot didn't see the userdb_quota_rule for some reason. Do you mean here that deliver didn't regenerate it correctly?
If then I do another IMAP GETQUOTAROOT the correct value is reported again (200M) and the contents of ~user/Maildir/maildirsize is changed to that value as well.
It's again beginning to sound like deliver isn't doing a userdb lookup and getting the userdb_quota_rule.
This is however not the only finding. I manipulated further my userdb quota and did set it to 90MB. Shortly after that another user (Quota 900MB) received a mail. The debug output for that mail delivery:
dovecot: deliver(user2): Quota warning: bytes=89653 2480 (95%)...
indicates that my settings were used instead for quota calculation.
So wrong user's userdb_quota_rule was used? That doesn't really make any sense..
On Thu, 2 Apr 2009, Timo Sirainen wrote:
The limits in maildirsize file are ignored by Dovecot as long as you defined quota_rules. So don't bother looking at them.
Thanks, that explains why my expectations about its contents were not met.
If then I do another IMAP GETQUOTAROOT the correct value is reported again (200M) and the contents of ~user/Maildir/maildirsize is changed to that value as well.
It's again beginning to sound like deliver isn't doing a userdb lookup and getting the userdb_quota_rule.
Yes, I verified by looking at the time stamps that you are right. The userdb seems not to be reread when using deliver. From the debug mail log output I do see however that at least deliver is used to store the mail:
postfix/local[27389]: ... status=sent (delivered to command: /usr/libexec/dovecot/deliver)
It looks like something with my combination of postfix and dovecot is not working as I do expect it. I will check my configs again and hope to find the reason.
-- Wolfgang Friebel Deutsches Elektronen-Synchrotron DESY Phone/Fax: +49 33762 77372/216 Platanenallee 6 Mail: Wolfgang.Friebel AT desy.de D-15738 Zeuthen Germany
On Wed, 2009-04-01 at 11:28 +0200, Ralf Hildebrandt wrote:
Two of my users are reporting that their quota is not being recalculated ALTHOUGH they deleted lots and lots of mails.
Does maildirsize file show any such deletions? Like lots of lines / large numbers in lines beginning with "-"?
I did a few tests and it seemed to work correctly. Also the Maildir++ quota code hasn't really changed since v1.1 (quota configuration structures changed somewhat though).
- Timo Sirainen tss@iki.fi:
On Wed, 2009-04-01 at 11:28 +0200, Ralf Hildebrandt wrote:
Two of my users are reporting that their quota is not being recalculated ALTHOUGH they deleted lots and lots of mails.
Does maildirsize file show any such deletions? Like lots of lines / large numbers in lines beginning with "-"?
I did a few tests and it seemed to work correctly. Also the Maildir++ quota code hasn't really changed since v1.1 (quota configuration structures changed somewhat though).
It seems my users need to log out and back in again to get the correct quota info displayed within Squirrel Mail
-- Ralf Hildebrandt Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155 http://www.computerbeschimpfung.de Recipient user name postmaster (postmaster@domain.de) not unique. Several matches found in Domino Directory. Oder auch: Viele Postmaster verderben den Server!
On Mon, 2009-04-06 at 23:15 +0200, Ralf Hildebrandt wrote:
- Timo Sirainen tss@iki.fi:
On Wed, 2009-04-01 at 11:28 +0200, Ralf Hildebrandt wrote:
Two of my users are reporting that their quota is not being recalculated ALTHOUGH they deleted lots and lots of mails.
Does maildirsize file show any such deletions? Like lots of lines / large numbers in lines beginning with "-"?
I did a few tests and it seemed to work correctly. Also the Maildir++ quota code hasn't really changed since v1.1 (quota configuration structures changed somewhat though).
It seems my users need to log out and back in again to get the correct quota info displayed within Squirrel Mail
So visible quota information doesn't change within a Squirrelmail session, but is updated after re-login? Sounds like a Squirrelmail issue, especially because it uses short-running IMAP connections so there shouldn't be any difference from Dovecot's point of view when user does a re-login to Squirrelmail.
Ralf Hildebrandt schrieb:
- Timo Sirainen tss@iki.fi:
On Wed, 2009-04-01 at 11:28 +0200, Ralf Hildebrandt wrote:
Two of my users are reporting that their quota is not being recalculated ALTHOUGH they deleted lots and lots of mails. Does maildirsize file show any such deletions? Like lots of lines / large numbers in lines beginning with "-"?
I did a few tests and it seemed to work correctly. Also the Maildir++ quota code hasn't really changed since v1.1 (quota configuration structures changed somewhat though).
It seems my users need to log out and back in again to get the correct quota info displayed within Squirrel Mail
Hi Ralf, thats maybe by design of squirrel after all a refresh is a must have i think for new calculate quota as far i remember its the same with a courier install here
-- Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
participants (4)
-
Ralf Hildebrandt
-
Robert Schetterer
-
Timo Sirainen
-
Wolfgang.Friebel@desy.de