spamassassin auto setup script problem

vancocom

Verified User
Joined
Jul 12, 2007
Messages
30
I have installed and enabled spamassassin using the auto setup for new users accoring to http://help.directadmin.com/item.php?id=36, but I am having a problem. The only change I made was to copy the preferences from a default settings file.

It seems that the spam folder in Squirrelmail does not show up when I create a new user. When I manually enable Spamassassin, the folder does show up.

Also, I can't seem to figure out how to control the folder delivery settings via the pre-defined settings. The changes to that field manually do not show up in that user's .spamassassin/user_prefs file.

Any ideas? My file contents are listed below.

Thanks!

-----

user_create_post.sh:

#!/bin/sh
if [ "$spam" = "ON" ]; then
DIR=/home/$username/.spamassassin
DEFAULTDIR=/usr/local/directadmin/scripts/custom
mkdir $DIR
cp $DEFAULTDIR/default_user_prefs $DIR/user_prefs
touch $DIR/user_prefs #or this is where you'd copy the default user_prefs you want them to have, instead of "touch".
chown ${username}:mail $DIR
chmod 771 $DIR
chown $username:$username $DIR/user_prefs
chmod 755 $DIR/user_prefs
touch $DIR/spam
chown mail:$username $DIR/spam
chmod 660 $DIR/spam
fi
exit 0;


default_user_prefs:

required_score 5.0
rewrite_header subject *****POSSIBLE SPAM*****


report_safe 1
 
Back
Top