Hi,
I have some post master filters already created and are working good. I have noticed that the keywords I add in the filter are case sensitive. Test, TEST, test and TeSt are all different keywords for postmaster filter. Is there a way to disable this case sensitivity?
EDIT: I'm using version 3.0.5
Regards
Kk
[SOLVED]Postmaster Filters - Keyword Case Sensitivity
Moderator: crythias
[SOLVED]Postmaster Filters - Keyword Case Sensitivity
Last edited by kool_kid on 23 Jun 2011, 07:30, edited 1 time in total.
OTRS 3.1.10
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Postmaster Filters - Keyword Case Sensitivity
[Tt][Ee][Ss][Tt] is one way to adjust for that...
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: Postmaster Filters - Keyword Case Sensitivity
Appreciate your response.
Is there a way to turn off case sensitivity completely?
Is there a way to turn off case sensitivity completely?
OTRS 3.1.10
Re: Postmaster Filters - Keyword Case Sensitivity
Right now I have 5-6 keywords that I search for in the subject field of incoming emails, if the keyword is found then the ticket is moved to particular queue. below is the example
Filter Condition
Header 1: Subject
value 1: ([printer] | [server*] | [network***] | [internet] | [computer*] | [laptop*])
Set Email Header
Header 1: X-OTRS-Queue
Value 1: IT-Queue
When I try this filter it works good for 2 or more words together like "Server Down" or "Computer freezes always" but it doesnt work if the subject field is having only one word like "Internet" or "LAPTOPS" etc.
Am I entering the keywords in wrong format? When i try using "||" operator instead of "|" operator in the above filter then all incoming emails goes to IT-Queue although the keywords are not matched.
Let me know where im going wrong with these filters.
Filter Condition
Header 1: Subject
value 1: ([printer] | [server*] | [network***] | [internet] | [computer*] | [laptop*])
Set Email Header
Header 1: X-OTRS-Queue
Value 1: IT-Queue
When I try this filter it works good for 2 or more words together like "Server Down" or "Computer freezes always" but it doesnt work if the subject field is having only one word like "Internet" or "LAPTOPS" etc.
Am I entering the keywords in wrong format? When i try using "||" operator instead of "|" operator in the above filter then all incoming emails goes to IT-Queue although the keywords are not matched.
Let me know where im going wrong with these filters.
OTRS 3.1.10
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Postmaster Filters - Keyword Case Sensitivity
brackets are used for characters within the brackets: [printer] could theoretical match p or r or pint. parentheses match whole words.
http://regexpal.com/
(printer|server|network|internet|computer|laptop)\w*
the \w means "word character" and the * means "0 or more of the previous". So, find printer or server or network or ... and also any word character (like "s", or not, or a lot of them, like serverssss or server1).
Kernel/System/PostMaster/Filter/MatchDBSource.pm about line 121:
that /i seems (as far as I can tell) to mean the item is case insensitive, although I'd probably consider maybe using lc as well or instead:
http://forums.devshed.com/perl-programm ... 17894.html
http://regexpal.com/
(printer|server|network|internet|computer|laptop)\w*
the \w means "word character" and the * means "0 or more of the previous". So, find printer or server or network or ... and also any word character (like "s", or not, or a lot of them, like serverssss or server1).
Kernel/System/PostMaster/Filter/MatchDBSource.pm about line 121:
Code: Select all
# match string
elsif ( $Param{GetParam}->{$_} && $Param{GetParam}->{$_} =~ /$Match{$_}/i )
Code: Select all
# match string
elsif ( $Param{GetParam}->{$_} && lc($Param{GetParam}->{$_}) =~ lc($Match{$_}) )
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: Postmaster Filters - Keyword Case Sensitivity
Thanks. I always appreciate your help.
The format you gave me works like a charm. Request you to add this Regex tutorial help or some guide on the otrs's Postmaster Filter webpage.
Thanks once again. This issue has been pestering me a lot.
The format you gave me works like a charm. Request you to add this Regex tutorial help or some guide on the otrs's Postmaster Filter webpage.
Thanks once again. This issue has been pestering me a lot.
OTRS 3.1.10