Launching SpamAssassin For all current Directadmin users
The following tutorial describes how to run spamasasin for all existing users added in directadmin.
We will do the whole thing by executing a simple script.
We log into the terminal of our server and create the spam.sh file
1 | nano spam.sh |
content:
1 2 3 4 5 6 7 8 9 10 11 | #!/bin/sh for i in `ls /usr/local/directadmin/data/users`; do { for d in `cat /usr/local/directadmin/data/users/$i/domains.list`; do { username=$i domain=$d spam=ON /usr/local/directadmin/scripts/custom/user_create_post.sh }; done; }; done; exit 0; |
We give it permission:
1 | chmod 755 spam.sh |
And we do:
1 | sh spam.sh |
Ready! after executing the script, all accounts will have the SpamAssassin mail filtering system enabled