Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » Filter Help - Match rma but allow other Subject contents (Can not seem to match rma explictly without discarding message)
  •  
ittech

Messages: 3
Karma: 0
Send a private message to this user
I need to match subject: RMA (not case sensitive)
BUT I need the filter to let other words through.
Working Example:
Subject: stop RMA from going

I can get this to work (copy into RMA folder and keep in inbox), but what if this happens:

Subject: pharmacy called

Now phaRMAcy has RMA in it!

I want this to stay in inbox and that is all.

I'm very frustrated and am to new to sieve to know if there is a way to make this filter work!

Any help very very much appreciated!!



  •  
freakinvibe

Messages: 1542
Karma: 62
Send a private message to this user
When your are in the list of filters, click the filter and then click "Edit script"

Delete all text in there and paste the following code

if anyof (
  header :matches "Subject" ["RMA *","* RMA","* RMA *"],
  header :is "Subject" "RMA")
{
  fileinto "RMA";
  keep;
}


That works for me.

[Updated on: Wed, 28 July 2010 11:05]


Dexion AG - The Blackberry Specialists in Switzerland
https://dexionag.ch
  •  
ittech

Messages: 3
Karma: 0
Send a private message to this user
Thank you VERY MUCH for the quick reply.
I did an 'rma test' in subject and it worked as it should, then I did an rmatest and it again forwarded to the rma folder and kept in inbox. I don't want it to do anything to the email if there is rma "within" the word. Maybe I can't get there from here.
The script seems to be ignoring the space between rma *? That is where my frustration comes from as I thought it was supposed to work as you wrote it, because I had tried the same thing.
Could it be it the "stop" at the end of the script? Also there is another layer of complexity as it is only when the user is cc'd:

if anyof (
header :matches "Subject" ["RMA *","* RMA","* RMA *"],
header :is "Subject" "RMA",
address :all :contains "Cc" ["joe<_at_>joe.com"])
{
keep;
fileinto "RMA";
stop;
}

Any suggestions GREATLY appreciated.

[Updated on: Wed, 28 July 2010 23:10]

  •  
freakinvibe

Messages: 1542
Karma: 62
Send a private message to this user
I tested on my system (6.7) with the exact sieve code I have given in my last post and a mail with the subject

RMAtest

did NOT get copied to the RMA folder, where as a mail with the subject

RMA test

did get copied to the RMA folder. The problem in your code is the "CC" bit. You have an "OR" operation for the CC instead of an "AND" (through the "anyof" keyword). Also, this code does check for lower/upper case. So the correct code including the CC bit would be:

if allof (
  header :contains "Subject" ["rma *","* rma","* rma *","rma"],
  address :all :contains "Cc" "joe<_at_>joe.com")
{
  fileinto "RMA";
  keep;
}



Dexion AG - The Blackberry Specialists in Switzerland
https://dexionag.ch
  •  
ittech

Messages: 3
Karma: 0
Send a private message to this user
THANK YOU!
The final script that actually worked:

if allof (
header :matches 'Subject' ['RMA *','* RMA','* RMA *','rma *','* rma','* rma *'],
address :all :contains 'Cc' 'joe<_at_>joe.com')
{
fileinto 'RMA';
keep;
}

So it was the 'matches' that seemed to be the issue.
I don't know why it would work for you on 6.7 and not work on 7.0, but the main thing is you helped me and it's working. I really appreciate your effort!

Thanks again!
Blaine

  •  
freakinvibe

Messages: 1542
Karma: 62
Send a private message to this user
You are welcome.

Have a great weekend.

Dexion AG - The Blackberry Specialists in Switzerland
https://dexionag.ch
Previous Topic: Kerio reporting host not found trying to deliver to subdomain of primary
Next Topic: pop3 download duplicate
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Sun Oct 22 13:53:01 CEST 2017

Total time taken to generate the page: 0.00433 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.