[vchkpw] Re: web based prefs for spamassassin
This overlaps with qmailadmin, so I'm cc'ing that list as well. On Saturday, June 14, 2003, at 09:37 AM, Trey Nolen wrote: There is a very nice looking package on Freshmeat (http://www.freshmeat.net) today that allows users to make changes to their Spamassassin preferences via the web. Has anyone tried using it with Vpopmail? Here's the page on Freshmeat: http://freshmeat.net/projects/webuserprefs/?topic_id=29 Be sure to take a look at http://spamassassin.org/dist/sql/README. SpamAssassin can read user prefs from a MySQL table. Here's another PHP interface for users to update there prefs as well http://spamassassin.org/devel/php-sa-mysql-0.5.tar.gz. 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'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. See http://spamassassin.org/dist/qmail/README.qmail-spamc for info on qmail-spamc. If you're using qmail-scanner just for the SpamAssassin scanning, then you should look into switching to qmail-spamc instead. -- Tom Collins [EMAIL PROTECTED]
Re: [vchkpw] Re: web based prefs for spamassassin
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: :0fw * 51200 | /usr/bin/spamc -u $EXT :0e { EXITCODE=$? } # deliver only spam to the spam hold directory :0 * ^X-Spam-Flag: YES { SPAMFOLDER=`/usr/local/scripts/putspam.sh` :0 $SPAMFOLDER/ } 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'` SPAMDIR=${USERMAIL}/Maildir/.spam (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 client. Regards, Andrew