I'm actually doing something like this already. We've patched vdelivermail to leave files in the user's Maildir/tmp if an environment variable is set. That variable is the name of a program to run with a set of arguments detailing the user, domain, size, and filename that we've stored.

Said program runs persistently and inserts that data into a MySQL database.
Asynchronously, another program reads from that database, determines the preferences associated with that user/domain (stored in the vpopmail db), and runs over the file sitting in Maildir/tmp with things as needed (spamassassin, Clam, etc...)

(If the program fails or is unexecutable, we tempfail back.)

If the file "passes" (tagged or not) we move it to the user's Maildir/new directory, otherwise send it to .Trash, delete, or whatever else, and update the SQL db as needed with the resolution.

It works pretty well (or will, once we finish tweaking our DB schema for this latest revision).


At 11:40 AM 1/13/2004, you wrote:
At 11:06 AM 1/13/2004, Ken Jones wrote:

The idea would be to have a file checked by vdelivermail.
If spam assassin is enabled, vdelivermail calls spamc
before dropping the email into the users Maildir.
Then the setup would be backwardly compatible with
current sites. And they could enable/disable spam assassin
by just updating the configuration file.

What I'd like to see with this is the ability to have either domain wide spam assassin settings or user specific spam assassin settings for the domain. I'm planning to host multiple virtual domains with Spam Assassin (mySQL Backend for configs) as an option, and having spamc called with the user name equal to the domain name would be great. I know some people would like a lower level approach so having vdelivermail have the option of passing no user name, the domain name as the user name, and the full email address as the user name would be helpful.

Reply via email to