If all you are trying to do is to add virus scanning capability to spampd, you can use amavisd-new (http://www.ijs.si/software/amavisd/). This will hand off the message to clamav and then recieve it back and then hand it off to spampd. Amavisd-new was made to integrate with spamassassin and IIRC, spampd uses Spam Assassin (http://www.spamassassin.org/).