I posted something very similar a while back; I've been running it for several months without trouble. As one person did point out, there can be blocking problems with such an implementation. For sake of simplicity, I've been thinking that the file under test should be written to disk and fed to spamc from there instead, but I'm relucant to push to disk what may alrady be there in the transaction.
http://nntp.x.perl.org/group/perl.qpsmtpd/208 -- Devin \ aqua(at)devin.com, 1024D/E9ABFCD2; http://www.devin.com Carraway \ IRC: Requiem GCS/CC/L s-:--- !a !tv C++++$ ULB+++$ O+@ P L+++
pgp00000.pgp
Description: PGP signature