Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » Filter that acts on a mailing list identifier? (We are trying to filter based on a list message vs. a non-list message)
  •  
firehaus

Messages: 7
Karma: 0
Send a private message to this user
We have a need to filter based on whether a message comes from a list (any) or not. The most straightforward way would seem to be to filter based on the '[' character which is always included in the subject line but we have been unable to get this to work.

We've tried this:
#if header :contains "Subject" "[*]"
#{
#  stop;
#}
#


and this:
#if header :contains "Subject" "["
#{
#  stop;
#}
#


We've tried marking the '[' character as part of a regular expression and that didn't appear to work either.
  •  
freakinvibe

Messages: 1529
Karma: 60
Send a private message to this user
The following code works for me

if header :contains "Subject" ["["]
{
  stop;
}


but I doubt this is really a good way to detect mailing lists. You could miss mails with subjects like

Re: Meeting [was Re: Metting]

or any other subject containg square brackets. You should probably look for specific Headers like:

List-Unsubscribe:

Precedence: list

[Updated on: Mon, 02 August 2010 14:53]


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

Messages: 7
Karma: 0
Send a private message to this user
Thanks for the suggestion. The Kerio Mail Filter seems to not like the script as written. In fact we get a warning:

Invalid script syntax

Unterminated list (square bracket "]" expected)


So we tried the following based on your suggestion which seems like a better way but so far it doesn't seem to work either:

if header :contains "Precedence" "list"
{
  stop;
}

  •  
firehaus

Messages: 7
Karma: 0
Send a private message to this user
Wait, the filter that is acting on "Precedence: list" is now working. Again, thanks for the suggestion as it is working.
  •  
freakinvibe

Messages: 1529
Karma: 60
Send a private message to this user
You are welcome.

I found that in some mailing lists (e.g. Yahoo Groups) you have the header

Precedence: bulk

So you might want to extend your code

if header :contains "Precedence" ["list","bulk"]
{
  stop;
}


In the end, it is really a matter of testing and trying to see what fits best in your specific environment.

Dexion AG - The Blackberry Specialists in Switzerland
https://dexionag.ch
Previous Topic: Kerio Connect 7.0.2 on Mac fails to bind ports 25 and 587
Next Topic: Kerio Connect 7.1 released
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: Mon Sep 25 15:30:20 CEST 2017

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