The clamav filter needs to have a $transaction->body_resetpos call before writing out its temporary file, in case it is not the first plugin to read the message body. I've attached a patch which does this and which also reads the location of clamscan from the config file (e.g. clamav /usr/bin/clamscan).
Hope this helps someone :)
Applied, thanks.