On Thu, Jun 10, 2004 at 11:42:37AM -0500, Dave Kettmann wrote:
> cat maildirsize
> 20971520S
... snip
Well, when I add up those figures, I get:
$ perl -ane '$t1+=$F[0]; $t2+=$F[1]; END { print "$t1 $t2\n"; }' <ert
13661820 48
So, maildirsize thinks there are 48 messages in there, totalling around
13MB, which is 65%.
If that's not the case, then I refer you to the answer I gave already today
(attached).
Did you build courier-imap using the --with-trashquota option?
Also, do an 'ls -laR' of the maildir. If there are messages which have
,S=nnnnnn in their filenames, then some maildir-aware applications will use
those sizes in preference to the actual disk usage of the files (because
it's quicker to get at). I presume courier does, but I've not investigated
the code.
Regards,
Brian.
--- Begin Message ---
On Thu, Jun 10, 2004 at 06:01:30PM -0400, [EMAIL PROTECTED] wrote:
> > Right, so what's in maildirsize ?
> [EMAIL PROTECTED] Maildir]# cat maildirsize
> 10485760S
> 2653422 32
> 668637 1
> -592 -1
OK. So:
- quota is 10485760 bytes (with no limit on the number of messages)
- when maildirsize was created, there were 32 messages in the maildir,
totalling 2653422 bytes
- then one message of size 668637 was added
- then later one message of size 592 was deleted
So the maildirsize file is saying that the mailbox currently contains
2653422+668637-592 = 3321467 bytes
32+1-1 = 32 messages
Now, this doesn't agree with what's currently in the mailbox. Some possible
explanations:
(1) You have hit the bug:
* maildir.c (maildir_checknew): Purging the Trash folder didn't
update the quota correctly when compiled with --with-trashquota.
This is fixed in sqwebmail-4.0.4.20040524 and courier-imap-3.0.4.20040524
(although for some reason it's not mentioned in the ChangeLog for
courier-imap).
It won't be an issue if you didn't say "--with-trashquota" when you
compiled.
(2) You deleted some files manually from the Maildir
(3) You are also using some other program apart from courier-imap to access
files in the Maildir, and this program is not aware of the maildirsize file;
when it deletes files, it doesn't update this file. (Examples: other imap
servers, other MUAs like pine, elm etc)
(4) You have found a bug in courier-imap's quota handling. If so, you need
to try and replicate it.
So I suggest you upgrade to 3.0.4.20040524. You can rm the maildirsize file
and it should be recreated automatically, either when the next new mail is
delivered into the mailbox, or possibly when you next do an IMAP login
(depending on whether imapd is able to get the quota information from
vpopmail). The recreated file should accurately count the total size and
number of messages in the maildir.
Then, if you can find a sequence of events which cause the maildirsize file
to come out of sync with the actual mailbox contents, let us know.
Brian.
--- End Message ---