3 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Re: maildrop quota ma...
FromSent OnAttachments
Andreas StollarJun 6, 2003 8:59 am 
Sam VarshavchikJun 6, 2003 9:32 am 
Andreas StollarJun 6, 2003 12:45 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] Re: maildrop quota maildirsize problemActions...
From:Andreas Stollar (andr@speakeasy.net)
Date:Jun 6, 2003 12:45:46 pm
List:net.sourceforge.lists.courier-maildrop

Hi Sam,

Thanks so much, that did work. I changed the lines below to this:

sprintf(buf + strlen(buf), "%1s ", libmail_str_off_t(maildirsize_size, n));

sprintf(buf + strlen(buf), "%1s\n", libmail_str_off_t(maildirsize_cnt, n));

and now maildirsize is created without space padding. I also tried to set my vendor straight, they pretty much dismissed by by quoting *your* spec, so I am hoping they will react this time. Thanks again.

Andreas

On Fri, 6 Jun 2003, Sam Varshavchik wrote:

Andreas Stollar writes:

Hi,

I am having a problem with how maildrop creates the maildirsize file. It seems to add extra spaces before the size and between the size and count fields. This is causing a problem with a proprietary webmail product by Mintersoft, that regards this file as corrupted and removes it, which results in it reporting that users have 0 usage and 0 quota.

Using qmail+ldap, maildirsize would look like this: [root@craniac Maildir]# cat maildirsize 15728640S,4000C 175298 22 2241 1 1715 1

which webmail would deal with nicely, and report that I have 6% of 15MB used. However when I started using maildrop for my MDA, it makes the maildirsize file look like this:

[root@craniac Maildir]# cat maildirsize 15728640S,4000C 175298 22 2241 1 1715 1

which causes webmail to freak out. I tried looking at the C code to find out where the extra spaces were being inserted, but I am not familiar enough with C to find it. The maildir++ spec, from the courier page states:

I've updated the spec recently to clarify that whitespace paddign is allowed. maildrop always handled padded whitespace, if it existed, even though it did not initially generate whitespace padding itself.

Whitespace padding was added to pad out all lines to equal length, in order to mitigate NFS O_APPEND-related brain damage. You should notify your vendor and ask them to update their code. Until such time you will have to remove this added padding from maildir/maildirquota.c:

sprintf(buf + strlen(buf), "%8s ", libmail_str_off_t(maildirsize_size, n));

sprintf(buf + strlen(buf), "%4s\n", libmail_str_off_t(maildirsize_cnt, n));