New version of sxaa available

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

dkelly
Scalix
Scalix
Posts: 593
Joined: Thu Mar 18, 2004 2:03 pm

New version of sxaa available

Postby dkelly » Tue Nov 21, 2006 8:38 pm

I've put a new version of sxaa onto the Admin Resource Kit wiki at http://www.scalix.com/wiki/index.php?title=Admin_Resource_Kit

There are a couple of changes:
  1. This version works with Scalix 11 as well as 10.
  2. To remove a rule, the --del option is now called --remove
  3. You can create a delete action using the --delete option


Please feedback if you find any problems.

Cheers

Dave

mhanisch
Posts: 31
Joined: Mon Jan 02, 2006 11:53 am
Location: Munich, Germany

no problems so far, but a question about the delete rule

Postby mhanisch » Fri Nov 24, 2006 7:28 am

Hello again!

I haven't run into problems so far, but I do have a question about the "--delete' rule:

I created a rule with sxaa --user NULL --delete; output looks like this:

root@mail ~]# ./sxaa -u NULL
OOF FLT OLK AANO ACTION TITLE STATE
--- --- --- ---- ---------- ------------------------------ --------
600 DELETE Ignore all incoming mails enabled

[root@mail ~]# ./sxaa -u NULL -i 600
Action
------
DELETE
to deleted items

The "to deleted items" part worries me - I thought a --delete rule would be a hard delete (as discussed in http://www.scalix.com/community/viewtop ... 1400#21400),
and not move these mails to the wastebasket.
Can you confirm if my assumption is correct?
If so, how can I create a rule that does a "hard delete"?
Fiddling with the file on my own would be OK if I can't do it with sxaa, but I don't have any clue which values need to go in which fields to make this work as I want it to...

Thanks for your feedback!

hempels
Posts: 11
Joined: Thu Sep 07, 2006 4:18 am

Re: no problems so far, but a question about the delete rule

Postby hempels » Thu Nov 30, 2006 8:24 pm

mhanisch wrote:The "to deleted items" part worries me - I thought a --delete rule would be a hard delete and not move these mails to the wastebasket.

Did you get any response? I have the same question/concern.

mhanisch
Posts: 31
Joined: Mon Jan 02, 2006 11:53 am
Location: Munich, Germany

Postby mhanisch » Fri Dec 01, 2006 5:38 am

No, I haven't heard anything yet.
I'm also not sure if there's any obvious way to test this myself.

tuxtattoo
Posts: 18
Joined: Wed Nov 02, 2005 6:24 pm

Re: New version of sxaa available

Postby tuxtattoo » Fri Dec 01, 2006 4:39 pm

dkelly wrote:I've put a new version of sxaa onto the Admin Resource Kit wiki at http://www.scalix.com/wiki/index.php?title=Admin_Resource_Kit

There are a couple of changes:
  1. This version works with Scalix 11 as well as 10.
  2. To remove a rule, the --del option is now called --remove
  3. You can create a delete action using the --delete option

Please feedback if you find any problems.

Cheers

Dave


Hi Dave,

Thank you very much for your continued work on sxaa. It is a handy tool to have in my toolbox. Right now i'm using Scalix 10.0.5 and the latest version of sxaa, but I have a question about the capabilities of sxaa and multiple requirements in a single filter.

A little explaining of what I'm doing may prove to be useful, so I'll start there.

I'm writing a tool to convert Thunderbird filters into Scalix filters. My plan was to have my tool generate a shell script which created all of the required command line calls to 'sxaa' that would duplicate the rules in Scalix. I'm sure not all rules will be possible, but most of mine should be no problem (mainly To/From -> Move to Folder ... etc).

The problem I quickly ran into is sxaa doesn't seem to allow you to pass it more than one condition for the FILTER. So, I logged into SWA only to find out that SWA lets you do multiple conditions but only in an AND fashion, no OR's. So, as a last ditch effort I logged into Outlook and created a rule in Outlook that does exactly what I need. It came out like this:

Code: Select all

# /usr/sbin/sxaa --user tuxtattoo --info 1000
Conditions
----------
OR (
    Sender = "S=%TUXTATTOO@SOMETHING.COM%"
    Sender = "S=%TUXTATTOO@SOMETHINGELSE.COM%"
)
Action
------
FILE in /INBOX/Personal/Tuxtattoo



That got me excited, so I then fed the following to sxaa:

Code: Select all

# /usr/sbin/sxaa --user tuxtattoo --title 'Personal - Tuxtattoo' --file 'Inbox/Personal/Tuxtattoo' "OR ( Sender = 'S=%TUXTATTOO@SOMETHING.COM%' Sender = 'S=%TUXTATTOO@SOMETHINGELSE.COM%' )"


Sadly, that didn't render a condition statement, only the Action (file). So, on to my question. Is sxaa capable of multiple conditions? If not could I beg you to add that capability? Even if it was to feed the raw condition statements such as those above?

Thank you for any help and direction you could offer me!

-Nathan

dkelly
Scalix
Scalix
Posts: 593
Joined: Thu Mar 18, 2004 2:03 pm

Re: New version of sxaa available

Postby dkelly » Fri Dec 01, 2006 5:18 pm

tuxtattoo wrote: Is sxaa capable of multiple conditions? If not could I beg you to add that capability? Even if it was to feed the raw condition statements such as those above?


You could try begging :lol:

At one point I did think about allowing more conditions but opted for the easy route when I couldn't create a sentence parser in 5 minutes.

I will give this some thought as it is a useful request but, given that we are really close to release ( did you see that we released our RC1 ? ), my priorities are somewhat diverted to that at the moment.

Cheers

Dave

tuxtattoo
Posts: 18
Joined: Wed Nov 02, 2005 6:24 pm

Re: New version of sxaa available

Postby tuxtattoo » Fri Dec 01, 2006 6:35 pm

dkelly wrote:
tuxtattoo wrote: Is sxaa capable of multiple conditions? If not could I beg you to add that capability? Even if it was to feed the raw condition statements such as those above?


You could try begging :lol:

At one point I did think about allowing more conditions but opted for the easy route when I couldn't create a sentence parser in 5 minutes.

I will give this some thought as it is a useful request but, given that we are really close to release ( did you see that we released our RC1 ? ), my priorities are somewhat diverted to that at the moment.

Cheers

Dave


Thanks for the reply Dave. I did see you release RC1, but I am using your Enterprise version and I don't think anyone would appreciate me putting an RC into production. :wink:

I am rather looking forward to the new version but I think I'll end up having to deploy 10 before 11 is released.

I'm a totally clueless about Python, but if I get any time in the near future I might take a crack at a parser for you. Right now trying to get this deployment strategy for Scalix developed, tested, and deployed is really stretching me pretty thin.

Thanks again,
Nathan

hempels
Posts: 11
Joined: Thu Sep 07, 2006 4:18 am

Re: New version of sxaa available

Postby hempels » Thu Dec 07, 2006 7:26 pm

dkelly wrote:I've put a new version of sxaa onto the Admin Resource Kit wiki at
  1. To remove a rule, the --del option is now called --remove


You may want to change the usage info to reflect that change!

Also, --del seems to create a --delete rule, which is a little odd.

dkelly
Scalix
Scalix
Posts: 593
Joined: Thu Mar 18, 2004 2:03 pm

Postby dkelly » Mon Dec 11, 2006 11:22 am

This is fixed up now.

The problem with the --del vs --delete doing the same thing is an annoying ( but unfortunately documented ) "feature" of Python's getopt.

When using the -- notation for long options, the getopt parser will look for the a unique match on the minumum number of characters in the option name. Because there is only one option that matches "del", it's accepted.

I checked through the library reference and there doesn't seem to be a way to change this to be an exact match only.

Cheers

Dave

carloscs
Posts: 25
Joined: Thu Apr 06, 2006 1:10 am
Location: Portugal

Postby carloscs » Mon Dec 18, 2006 12:37 am

Two options:

Make the --del switch give a "deprecated" error.

or

make the --del switch a synonym for the erase switch.

IMHO, having --del == --delete can give rise to strange errors with old scripts.

mweichert
Posts: 66
Joined: Fri Sep 22, 2006 9:32 am

Redirect not working...

Postby mweichert » Tue Dec 19, 2006 1:10 am

I cannot get --redirect to work. Mail is not being redirected at all. I don't know much about sendmail, but there is nothing in /var/log/mail.err

--forward works fine.

Any ideas?

Thanks,
Mike

desmo
Posts: 18
Joined: Thu Nov 09, 2006 1:22 pm

--text not working

Postby desmo » Thu Feb 22, 2007 3:01 pm

Hi,

I was in need to setup an auto reply that would send a text to the sender in case a condition was encountered but --text was not recognized as a valid command (am I doing something wrong?).

sxaa --user "name surname" --reply --text update.txt --header "content analysis indicated this message is junk" --not

cp: unrecognised option `--text'

I couldn't use the webmail rule wizard because I needed a negative condition on the headers and I couldn't see any way to do it from the wizard. As a workaround I run:

sxaa --user "name surname" --reply update.txt --header "content analysis indicated this message is junk" --not

This sets up an out of office, but I needed the reply to be always sent back to the sender, so I just corrected it:

sxaa --user "name surname" --oof n --ref 606

And it is now doing what I wanted.

Cheers

Simone

sbyrne
Posts: 44
Joined: Thu Aug 31, 2006 10:57 am
Location: Colorado Springs, CO

what the heck

Postby sbyrne » Fri Mar 09, 2007 7:48 pm

I fancy myself a python newbie, so I figured heck, let's see what Dave's up to here...

first, I find myself scratching my head over these lines (in main function beginning on line 804):
if not action_type == "" and not action == "ADD":
error_status += 1
error_message = error_message + "Action type must be one of --forward, --reply, --file or --redirect\n"

the logic seems to me that it should be rather:
if action_type == "" and not action == "ADD":
error_status += 1
error_message = error_message + "Action type must be one of --forward, --reply, --file or --redirect\n"

but...I only vaguely understand the ins and outs of what you're doing with this script anyway so, moving on...

anyway, to address Nathan's query about passing in a set of conditions (all in one big string), I think I could probably take a crack at that which leads me to the next question:
"how does one assist?" I'm sure it's documented somewhere, but I couldn't find it...

Sam

netcomrade
Posts: 70
Joined: Mon Aug 21, 2006 2:32 pm

can't get forward to work

Postby netcomrade » Sun Mar 25, 2007 10:19 am

can't get forward to work after migration from 10 to 11
see my other post
viewtopic.php?t=6756

heupink
Posts: 146
Joined: Thu Jul 15, 2004 9:36 am
Location: netherlands
Contact:

Postby heupink » Tue Mar 27, 2007 6:07 am

so, lot's of talk in the forum about a "hard delete" option in sxaa

dkelly (scalix) even pointed to this article, detailing how to use it, but I don't get it:

is there a "hard delete" option in sxaa? How to use it?
Hard delete as in: message really GONE, not just a 'move to wastebasket'

(see here viewtopic.php?t=3417 and viewtopic.php?t=2950)

regards!


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 2 guests

cron