You might want to investigate how maildrop implements this. From http://www.flounder.net/~mrsam/maildrop/:
Unlike procmail, maildrop will not read a 10 megabyte mail message into memory. Large messages are saved in a temporary file, and are filtered from the temporary file. Temporary files are saved in the user's home directory. If the standard input to maildrop is a file, and not a pipe, a temporary file will not be necessary. A similar approach has been suggested[1] for TMDA in the past. Footnotes: [1] http://mla.libertine.org/tmda-users/2002-07/msg00186.html _________________________________________________ tmda-workers mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-workers
