nano /root/sa.sh
#!/bin/sh
for i in `ls /usr/local/directadmin/data/users`; do
{
DIR=/home/$i/.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 ${i}:mail $DIR
chmod 771 $DIR
chown $i:$i $DIR/user_prefs
chmod 755 $DIR/user_prefs
touch $DIR/spam
chown mail:$i $DIR/spam
chmod 660 $DIR/spam
};
done;
exit 0;
Dar permisos de ejecución
chmod +x /root/sa.sh
Ejecuarlo
/root/sa.sh