On Tue, 29 Mar 2005, Jason 'XenoPhage' Frisvold wrote: >When I was searching around on the binc list for an answer to this, I >ran across a message from andreas mentioning that while binc could >support maildirsize, it wouldn't support the message size in the >filename (I believe that was it) because that breaks the maildir rules...
For the record: http://www.inter7.com/courierimap/README.maildirquota.html Unfortunately, the maildirsize answer I can give for 1.2 isn't an uplifting one. :-) 1) The size of a message takes quite a while to figure out, and the main reason for that is that the files are stored in LF/Unix style in Maildir (why, oh why?), so calculating the size requires the file to be read and converted to CRLF, which is what IMAP requires. The storing of the size in the file name does break a do-not in the (somewhat loose) Maildir spec, but the I/O load impact is the biggest problem... Opening a mailbox with 5000 messages, calculating the size of each message, renders an average mail server useless because of the immense I/O load. 2) maildirsize is documented to be inaccurate. For it to work precisely, _all_ software accessing the Maildir must adhere to the same rules, and this is a restriction that Binc IMAP does not enforce - Binc IMAP is a non-intrusive IMAP server. 3) Maildir++ uses no locks, and race conditions allow users to go over their quota level. >I'm not sure if there is some special advantage to the message size in >the filename, but all I care about at the moment is making sure >maildirsize is properly updated when users access their mailboxes via >imap. I suppose I could write some sort of wrapper program to recalc the >maildirsize every x hours, but that, I believe, would be overkill... Yes, that'll be a killer. Here's a place where mbox makes life easier - the mailbox quota check is simply a stat. For your specific need, you could implement maildirsize managing code in Binc IMAP (and in your delivery agent). It shouldn't be too much code. But I can't include it in 1.2 at least. It is on the list for 1.3, but an efficient quota management implementation really requires a different mailbox format. :-( Andy :-) -- Andreas Aardal Hanssen | http://www.andreas.hanssen.name/gpg Author of Binc IMAP | "It is better not to do something http://www.bincimap.org/ | than to do it poorly."
