Matt Sergeant wrote: > On Mon, 15 Sep 2008 17:39:33 -0400, Chris Lewis wrote: >> Matt Sergeant wrote: >>> On Mon, 15 Sep 2008 16:40:24 -0400, Chris Lewis wrote: >>>> According to the documentation, when you call >>>> $transaction->body_filename, you get a temporary file name that points >>>> at a file that contains the message. If you examine body_filename, it >>>> has no headers. >>>> >>>> The clamdscan plugin uses body_filename to hand off to clamdscan. Which >>>> means that ClamAV doesn't get to see the headers. Which is important to >>>> some ClamAV detections (eg: the ClamAV self-test email is _not_ caught >>>> by the clamdscan plugin). >>>> >>>> [In contrast, the spamassassin plugin carefully spits out >>>> header->as_string and then the body into spamd.] >>>> >>>> Is this working as intended? >>> My gut instinct is to say no. But I worry a little bit that we might >>> break something else by fixing it... >> Would it be worth considering have a data_filename() call, that does >> exactly the same thing as body_filename, but includes the headers too? >> Then we can fix the clamdscan plugin without breaking anything else. > > I thought about that, but you'd have to write to a file twice then :-/
Only if you used both interfaces. The only plugins that I use that use "email in a file" (for externalizing it to an outside process) is spamassassin and clamdscan, and spamassassin doesn't use body_filename. I think it "manually" rams it down a pipe.