To enable spamassassin for all existing accounts in Directadmin

To enable spamassassin for all existing accounts in Directadmin, create the following script and execute it.

Open a new file enablespam.sh

#!/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;

Chmod the file as 755 and execute it.

chmod 755 enablespam.sh

./enablespam.sh


Enjoy:)

    0 comments: