> If you configure SpamAssassin to use a MySQL table, and update users
> qmail files to call spamc with the "-u [EMAIL PROTECTED]", you could
> possibly get some tight integration between SA, vpopmail and qmailadmin.

I've done this; it's dead simple.

> I'm not sure how you'd set up spamc to store the message in the user's
> directory though, if you were to add it to the .qmail file.  Perhaps
> someone could write a modified spamc, or a wrapper for it, that would
> make sure the output of spamc was placed in the Maildir and then return
> the proper exit code for qmail-local.  I'm currently using qmail-spamc
> as a replacement for qmail-queue to scan all incoming messages before
> they're delivered, but it can't handle per-user prefs.

Procmail does it easily.  Here's the snippet from my global .procmailrc:

* < 51200
| /usr/bin/spamc -u $EXT


# deliver only spam to the spam hold directory
* ^X-Spam-Flag: YES


The putspan.sh script takes the USER environment variable and returns the 
path to that user's 'spam' IMAP folder, creating it if necessary.  The 
magic is in vuserinfo:

USERMAIL=`$VPOPMAIL_BIN/vuserinfo $USER | awk -F ' +' '/^dir:/ { print $2 }' 
| sed -e 's./\+./.g'`


(there's more in there than just that, but that's the meaty bits)

I then have another script that runs every day and erases all mail in the 
SPAM imap folders that are older than about 2 weeks.  Nice and simple and 
works _very_ well.  People can check what spam they have with any webmail 


Reply via email to