Page 1 of 1

sxaa one rule applied to all users

Posted: Sun Aug 20, 2006 5:43 pm
by kmcelwain
I'm trying to push out the SPAM rule for all users

sxaa --file "junkmail" --subject "[SPAM]" --title "Anti-Spam Rule"

So what do I do to make sure it happens to everyone....and please don't tell me one at a time.

Thanks

Posted: Sun Aug 20, 2006 6:36 pm
by florian
Well, I do. One at a time - however automatic, thanks to the power of Linux shell scripting....

You'll need to write a script that does a loop... something like

Code: Select all

omshowu -m all | egrep -v 'sxadmin|sxqueryadmin' | while read username
do
    echo "Processing User $username"
    sxaa -u "$username" - ......
done

I don't have a test system on me right now, so I haven't worked this out in detail, but that should give you a pattern to start from.

Cheers,
Florian.


sxaa everyone

Posted: Sun Aug 20, 2006 7:31 pm
by kmcelwain
Alright...I'll setup a test box and give it a shot.

I do scripts all the time with databases...as I get more used to Scalix...hopefully I'll become more of a doer and less of an asker.

Thanks for the heads up