Hi,
I'm using sqwebmail 4.0.5 on FreeBSD 5.2 with quotas on Maildirs.
After I delete a message, the maildirsize file get corrupted.
Here is a sample maildirsize after corruption :
10485760S
-583856840605486769 89
At compile time, into maildir source directory, I got this warning:
Compiling maildirquota.c
maildirquota.c: In function `docount':
maildirquota.c:765: warning: passing arg 2 of `maildir_parsequota' from incompatible
pointer type
maildir_parsequota is called with a pointer to an off_t as its second
argument instead of a pointer to a long. In FreeBSD 5, off_t have 64
bits but long only have 32.
After the one line patch below applied, the trouble disapear.
--- maildir/maildirquota.c.dist Fri Jun 18 16:20:14 2004
+++ maildir/maildirquota.c Fri Jun 18 16:21:55 2004
@@ -748,7 +748,7 @@
char *p;
DIR *dirp;
struct dirent *de;
-off_t s;
+long s;
if (stat(dir, &stat_buf)) return (0); /* Ignore */
if (stat_buf.st_mtime > *dirstamp) *dirstamp=stat_buf.st_mtime;