Page 1 of 1

sxaa to create an auto-reply

Posted: Tue Jun 19, 2007 4:47 pm
by maxpower
Hi, Along with our move to Scalix, our company is undergoing a name change. We are currently accepting mail for olddomain.com and newdomain.com. Our mail exchanger is forwarding mail from both to the actual accounts on our scalix server: user@newdomain.com.
What I would like to do is to setup an autoreply telling users to send mail to user@newdomain.com. I only want to send this autoreply if the mail was addressed to user@olddomain.com. This is easily done in the webmail interface rules wizard by enabling the condition: recipient address is user@olddomain.com. I would like to be able to do this command line for the rest of the company though as I do not have access to their webmail accounts. I am familiar with the syntax sxaa --user user --reply reply.txt. But is it possible to add the recipient condition this way?

Posted: Tue Jun 19, 2007 5:04 pm
by Shredder
According to the manual included on the wiki page for sxaa, you can do some conditions from the command line.

http://www.scalix.com/wiki/index.php?title=Admin_Resource_Kit#Creating_rules_for_users_with_sxaa

Shredder

Posted: Wed Jun 20, 2007 9:37 am
by maxpower
Yes I read that, but no mention of how to add a 'recipient is' condition.

Posted: Wed Jun 20, 2007 2:29 pm
by KevinAnderson
From the docs....


Specifying Conditions
---------------------
It is also possible to specify a simple condition to apply to a rule. There are a number of possible conditions: --subject, --sender, --header and --itemclass.

sxaa --user user --file "foldername" --subject "SPAM"
sxaa --user user --file "foldername" --sender "dave@scalix.com"
sxaa --user user --file "foldername" --header "X-Spam-Status:***"
sxaa --user user --file "foldername" --itemclass "IPM.Schedule"

For each of the conditions, a wildcard is applied. So, the example rules above should be read as "CONTAINS" the specified string.
NB: Because of the way that sxaa specifies a wildcard internally, if you need to use a '%' character in your string, you should also use the --wildcard option as follows:

sxaa --user user --file "foldername" --subject "90%" --wildcard "@"

This indicates that the "@" character should be used as an internal wildcard character. Obviously, choose a character you do not need to specify in your strings.


So the header you'd want looks like this:

To: name <someone@domain.com>

So Something like this should work...

sxaa --user user --reply --text file.txt --header "domain.com"