For those people wanting to implement side wide SA but allow elective removal in an 
ISP situation you can make a very very simple change to your /etc/procmailrc



:0
* ! ? test -f $HOME/.sabypass
{
:0fw
* < 256000
| /usr/bin/spamc -f
}

then to bypass a user from SA just 

touch /home/bubba/.sabypass

here is a simple script to add or delete defaults prefs when a user is added/deleted


ARGS="-h <db host> -u <db sa user> --password=<db sa user pass> 
--database=spamassassin -C"
TABLE="<tablename>"

USER=$1
ACTION=$2

if [ -z $USER || -z $ACTION ] ; then
        echo "command must be followed by single username and an action";
elif [ $ACTION = "CREATE_USER" ] ; then
        mysql $ARGS -e "INSERT into $TABLE (username, preference, value)
VALUES ('$USER', 'required_hits', '6');"
        mysql $ARGS -e "INSERT into $TABLE (username, preference, value)
VALUES ('$USER', 'use_terse_report', '0');"
        mysql $ARGS -e "INSERT into $TABLE (username, preference, value)
VALUES ('$USER', 'defang_mime', '0');"
        mysql $ARGS -e "INSERT into $TABLE (username, preference, value)
VALUES ('$USER', 'report_header', '1');"
        mysql $ARGS -e "INSERT into $TABLE (username, preference, value)
VALUES ('$USER', 'rewrite_subject', '1');"
elif [ $ACTION = "DELETE_USER" ] ; then
        mysql $ARGS -e "DELETE from $TABLE WHERE username = '$USER';"
fi


-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to