rules broken?

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

RickC
Posts: 194
Joined: Tue Nov 16, 2004 12:55 pm
Location: Massachusetts USA
Contact:

rules broken?

Postby RickC » Fri Oct 01, 2010 10:32 am

Hi all,

I'm trying to set up a rule that would delete an email if subject = SPAM, otherwise redirect it to another address.

I have:

# ./sxaa --user test.user
OOF FLT OLK AANO ACTION TITLE STATE
--- --- --- ---- ---------- ------------------------------ --------
Y 600 DELETE SXAA DELETE:600 enabled
Y 601 REDIRECT SXAA REDIRECT:601 enabled

# ./sxaa --user test.user --info 600
Conditions
----------
Subject = "%SPAM%"
Action
------
DELETE
to deleted items

# ./sxaa --user test.user --info 601
Action
------
REDIRECT to S=richard.chamberlain/OU1=internet/DDT1=RFC-822/DDV1=richard.chamberlain@xyz.com/CN=richard.chamberlain/INTERNET-ADDR=richard.chamberlain@xyz.com

I would think once the rules read the first rule (if spam, delete) there wouldn't be anything for the second (redirect), but it always redirects regardless of rule #600.

Am I doing this wrong?

Thanks,

Rick

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Re: rules broken?

Postby Valerion » Mon Oct 04, 2010 4:21 am

The rules are not processed in order, but by type, with certain types taking precedence. Off-hand I can't recall the exact sequence. You may be able to get around this with a rule created from inside Outlook. There's an option there to "Stop processing more rules" that I use quite a lot. I haven't been able to properly duplicate this with SXAA yet, though.

RickC
Posts: 194
Joined: Tue Nov 16, 2004 12:55 pm
Location: Massachusetts USA
Contact:

Re: rules broken?

Postby RickC » Mon Oct 04, 2010 9:32 am

Thanks! I'll try that.

Rick

RickC
Posts: 194
Joined: Tue Nov 16, 2004 12:55 pm
Location: Massachusetts USA
Contact:

Re: rules broken?

Postby RickC » Mon Oct 04, 2010 2:59 pm

Unfortunately we need a redirect, not a forward :( there seems no redirect in Outlook ...

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Re: rules broken?

Postby Valerion » Tue Oct 05, 2010 5:54 am

Well ... you could try to construct one, but it will take a bit of time and effort.

  • Create a forward rule in Outlook and note the number. Add all the options you want to use.
  • Create a redirect rule in sxaa and note the number
  • omshowu -n "User Name" -f will give you the user's g directory
  • There should be a file named 000003d
  • MAKE A BACKUP OF THIS FILE
  • You can use tf.browse -i to see how each of the rules are constructed in the file
  • Create your own rules file, then use tf.browse -g to generate a new 3d file
  • Test your new rules carefully

The biggest stumbling block will be the handling of wildcard characters in the input and output files, but I think it should be covered by the man page for tf.browse or elsewhere on the forum. If not, we can try to assist.

RickC
Posts: 194
Joined: Tue Nov 16, 2004 12:55 pm
Location: Massachusetts USA
Contact:

Re: rules broken?

Postby RickC » Tue Oct 05, 2010 9:07 am

Ugh, wow, thats ugly.

I have:

# /root/sxaa --user supportdesk
OOF FLT OLK AANO ACTION TITLE STATE
--- --- --- ---- ---------- ------------------------------ --------
Y Y 1003 DELETE Scalix Rule: Delete Spam/Undelivered email enabled
Y Y 1004 FORWARD Scalix Rule: Forward email to rule.test enabled
1005 REDIRECT SXAA REDIRECT:1005 enabled


then the 3d file:

# tf.browse -i 000003d
HEADER (DN) 1 0 2 1002 0x0 0x0 0 0x0 0x0 0x2 0x0 0x0 ""
AA_NO () 0x0 1001 0 0 0 0 "" "" "" "" "" "SXAA REDIREC\
T:1001"
AA_NO (DN) 0x4 1003 0 0 0 0 "" "" "" "" "" "Scalix Rul\
e: Delete Spam/Undelivered email"
FILTER_START (DN) 0x0 0x0 1
FILTER_STRING (DN) 0x0 0x0 2 1 0 0 "Spam Quarantine Summary" "" \
"UTF8" "" ""
FILTER_STRING (DN) 0x0 0x0 2 1 0 0 "Undelivered Mail Returned to S\
ender" "" "UTF8" "" ""
FILTER_END (DN)
AA_DELETE (DN) 0x0 0x0 0 0
AA_NO (DN) 0x4 1004 0 0 0 0 "" "" "" "" "" "Scalix Rul\
e: Forward email to rule.test"
FILTER_START (DN) 0x0 0x0 0
FILTER_STRING (DN) 0x1 0x0 2 1 0 0 "Spam Quarantine Summary" "" \
"UTF8" "" ""
FILTER_STRING (DN) 0x1 0x0 2 1 0 0 "Undelivered Mail Returned to S\
ender" "" "UTF8" "" ""
FILTER_END (DN)
AA_SIMPLE_FORWARD (DN) 0x1 0x0 1167 0 0 "" "UTF8" "" "" "UTF8" "" \
"" "" "" "" ""
AA_NO () 0x0 1005 0 0 0 0 "" "" "" "" "" "SXAA REDIREC\
T:1005"
AA_REDIRECT () 0x0 0x1 0 0 "S=rule.test/OU1=internet/DDT1=RFC-822/D\
DV1=rule.test@abc.def.ma.us/CN=rule.test/INTERNET-ADDR=rule.test@abc.def.m\
a.us"

I have no clue how to 'merge' the forward and redirect, is that what I need to do?

Thanks,

Rick


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 27 guests