Spamassassin enabled on all domains by default?

Why cant you get it to work. You just follow the steps. You probably can get someone here to help you not sure if they will charge you are not.

Try this:

1. Login as root

Enter the following commands:
Code:
touch /usr/local/directadmin/scripts/custom/user_create_post.sh

echo '
#!/bin/sh
if [ "$spam" = "ON" ]; then
   DIR=/home/$username/.spamassassin
   mkdir $DIR
   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;' > /usr/local/directadmin/scripts/custom/user_create_post.sh

chmod 755 /usr/local/directadmin/scripts/custom/user_create_post.sh

Next command to enable spamass for all existing users:

Code:
cd /usr/local/directadmin/scripts

echo "
#!/bin/sh
for i in `ls /usr/local/directadmin/data/users`; do
{
  username=$i spam=ON /usr/local/directadmin/scripts/custom/user_create_post.sh
};
done;
exit 0;" > /usr/local/directadmin/scripts/enable_spam.sh
chmod 750 /usr/local/directadmin/scripts/enable_spam.sh
Code:
/usr/local/directadmin/scripts/enable_spam.sh

Boom your done!
 
I don't know if you copied that from the DirectAdmin Knowledge Base or not, but there's an article here.

Jeff
 
Back
Top