|
Hi Ppl,
We had a problem a while back with our users
getting spurious quota warnings from qmail. I found that the format that
sqwebmail was writing to the ~/Maildir/maildirsize file was being misread by
qmail.
We're using qmail-1.03 (ldap) and hunting through
the code I found that in <qmailsrc>/maildir++.c, lines 292-314, the
maildirsize file is read, but no account is made for any other characters at the
beginning of a line other than either a number or a '-' sign. If a space
is encountered, it is assumed that the first field has ended, and starts reading
the second field. The upshot being is that size of messages and number of
messages were being mixed up.
When writing the maildir size, <sqwebmail 3.3.6
source>/maildir/maildirquota.c lines 556-560 do the following:
sprintf(buf +
strlen(buf),
"%8s ", str_off_t(maildirsize_size, n));
sprintf(buf +
strlen(buf),
"%4s\n", str_off_t(maildirsize_cnt, n)); Which creates an entry in the maildirsize file
which is right aligned, padded with spaces to the left. The easy fix was
to just change the sprintf format to %-8s and %-4s:
sprintf(buf +
strlen(buf),
"%-8s ", str_off_t(maildirsize_size, n));
sprintf(buf +
strlen(buf),
"%-4s\n", str_off_t(maildirsize_cnt, n)); Have I got this right? Is this something to
add in the main source, or a patch I need to personally keep?
Rich
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.384 / Virus Database: 216 - Release Date: 8/22/2002 |
- [sqwebmail] Re: Maildir Quota Bug Richard Goode
- [sqwebmail] Re: Maildir Quota Bug Sam Varshavchik
