#!/bin/sh
if [ "$spam" = "ON" ]; then
DIR=/home/$username/.spamassassin
mkdir $DIR
wget -O $DIR/user_prefs http://MY_CUSTOM_CONF_URL >/dev/null 2>&1
# 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;
mv CUSTOMfilterPATH /etc/virtual/$domain/filter
mv CUSTOMfilterPATH.conf /etc/virtual/$domain/filter.conf
chown mail:mail /etc/virtual/$domain/filter*
chmod 600 /etc/virtual/$domain/filter*