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/).
Eric
Comment on Re: Virus email message randomly scanned multiple times
Hello Eric,
I am using amavisd now, but amavisd is calling Mail::SpamAssassin in non standard way , it will ignore spamassassin header tag configuration. I also want to learn some Perl skills from adding the virus scan feature.