On Tue, 3 Feb 2004, Nick Harring wrote:

> I've experienced this with several versions of courier and several
> versions of vpopmail. Seeing as the way I read the maildir++ "standard"
> each time you manipulate a maildir its your job to update the
> maildirsize file, then what deletes messages without adding subtraction
> lines to maildirsize is at fault. I'd guess that'd be courier.

OK, that makes sense then.  vdelivermail or maildrop would never put a "-"
line in maildirsize; only courier imap or courier pop3d would do this.
After some serious digging across Mr. Sam's three sites (why can't he put
all the Courier stuff in one place??) I found this:

http://www.inter7.com/courierimap/README.maildirquota.html

Down towards the bottom is a brief rundown on the spec and how it works.
Of particular interest is this, which relates to the claim that "quotas
can only be inaccurate for 15 minutes":

"If the numbers we got indicated that the Maidlir++ is over quota, some
additional logic is in order: if we did not recalculate maildirsize, if
the numbers in maildirsize indicated that we are over quota, then if
maildirsize was more than one line long, or if the timestamp on
maildirsize indicated that it's at least 15 minutes old, throw out the
totals, and recalculate maildirsize from scratch."

So something is not obeying the spec, as I've found a number of users that
show 98% usage (out of 20MB) for some time (longer than 15 minutes) and
with an actual usage of a few KB.  Forcing a recalculation by nuking the
file brings it into shape.  I *assume* that recalculation gets triggered
by me running "vuserinfo".

I have not yet seen any noticeable error in my own account, which I
exclusively access via IMAP.  So I'm stumped.

For example, if I clear maildirsize on my account, then I end up with a
file like this:

[EMAIL PROTECTED]/home/vpopmail/domains/foo.net/K/spork/Maildir]# cat maildirsize
314572800S
73955428 9249

And if I expunge two messages from my INBOX via IMAP:

[EMAIL PROTECTED]/home/vpopmail/domains/foo.net/K/spork/Maildir]# cat maildirsize
314572800S
73955428 9249
   -1838   -1
   -1069   -1

So that seems correct.

Sending myself an email, delivery via maildrop:

[EMAIL PROTECTED]/home/vpopmail/domains/foo.net/K/spork/Maildir]# cat
maildirsize
314572800S
73955428 9249
   -1838   -1
   -1069   -1
    1412    1

and then deleting that:

[EMAIL PROTECTED]/home/vpopmail/domains/foo.net/K/spork/Maildir]# cat
maildirsize
314572800S
73955428 9249
   -1838   -1
   -1069   -1
    1412    1
   -1412   -1

So far so good.  Deleting a message via POP:

[EMAIL PROTECTED]/home/vpopmail/domains/foo.net/K/spork/Maildir]# cat
maildirsize
314572800S
73955428 9249
   -1838   -1
   -1069   -1
    1412    1
   -1412   -1
   -1843   -1

So I'm stuck here.  I only have vdelivermail and maildrop delivering mail,
courier pop3d and imapd retrieving it, and they all seem to work properly.

Anyone have any ideas what to look at?

Thanks,

Charles

Reply via email to