In true Open Source tradition I found a program that did *almost* what I wanted and modified the source to do what I wanted. Once I had it working I submitted the patch to the maintainer.
The program is called BlackHole and does AV and SPAM checking. I use SpamAssassin for SPAM protection so my main focus was AV. BlackHole was made to work with Qmail, but because of my setup I needed it to output to STDOUT. It currently only wrote to Maildir and mbox. With a little modification I soon had it working. Hopefully, someone actually finds it useful.