Have you looked at maildrop? It's a configurable/scriptable mail delivery agent you can use to call vdelivermail or spamassassin.
Gabriel Ambuehl wrote:
I wonder how SpamAssassin could best be integrated into vpopmail (preferably without having .qmail for each user). I know there's small C stub (spamc) for SpamAssassin that reads the mail on stdin, feeds it to the spam assassin daemon (TCP or pipe, cna't remember, doesn't matter, anyay) and delivers whatever changes back to stdout. Now I wonder about two things: does vdelivermail know how big a given message is (you don't want SpamAssassin check mails bigger than a few kb for the sake of CPU utilization)? Given we feed the message to spamd, can vpopmail just link stdin to the FD that feeds back the data from spamd and go on with its job? If so, it would probably be easy enough to integrate spamc into vpopmail and have it check for existence of a file like user/.usespamassassin to figure out whether it should filter the data through spamd. I'd appreciate any comments on this. I'm thinking about trying to integrate spamc into vpopmail, but I'd like to hear comments on this and some feedback on my planned approach. Unfortunately, my time resources are kinda limited these days but it's high time I do something about the huge amounts of spam our servers are faced with each day...