[imp] Patch for mbox downloads in IMP 3.2.5

Ross Becker ross at rbecker.org
Wed Sep 8 13:28:13 PDT 2004


I already tried sending one message about this to the list, but it 
apparently got refused, I'm guessing because it had a small attachment.

I've patched IMP 3.2.5 to use a tmpfile() stream for generating mboxes 
for download- this way they're automatically removed if the PHP process 
goes away for an unexpected reason.  It gets a tmpfile, generates the 
mbox from the folder into that, returns the file handle, then seeks to 
the end and uses ftell() to find the size of the stream, and then does 
8k blocks to deliver this to the user. This prevents large mail folders 
from blowing up PHP's memory size. I've generated a unified diff of my 
changes- is there any interest in this patch for going into CVS?

Cheers
    Ross



More information about the imp mailing list