SUGGESTED FIX
With the help of members of the regular expression team (and of course the UWC development team), we
were able to optimize the regular expression used in parsing filters with \ and ". The results are quite
encouraging: we are able to get to create reasonably complex filters with \ and " (please see below).
The patch with this fix is available at the following location:
/net/brandy.red.iplanet.com/wspace/sv102973/JAN-31-2006/patches-uwc-6.2p3-export-full-SPARC-20060131-118540-28.tar
Please feel free to use the patch at the above location in order to test in your environment and let me know
how is goes...
Regards,
Srinivas.
=====================================================================================
Following are some of the filters that were successfully created, read and edited:
$ ldapsearch -b "ou=people,o=india.sun.com,dc=india,dc=sun,dc=com" -h varali.india.sun.com -D "cn=directory manager" -w password -T -x -S mailSieveRuleSource -B "uid=admin"
.
.
.
mailSieveRuleSource=#RULE: $Name="quotedFilter" $Order=11 $Type="DEFAULT_TYPE"
require "fileinto";
#BEGINFILTER
if allof(header :contains ["Subject"," Comments"," Keywords"] "output from \"cron\" or \"mon\" or \"bon\" or \"john\" or \"this\" or \"that\""){
fileinto "Inbox";
stop;
}
#ENDFILTER
mailSieveRuleSource=#RULE: $Name="slashedFilter" $Order=12 $Type="DEFAULT_TYPE"
require "notify";
require "variables";
#BEGINFILTER
if allof(allof(header :contains ["Subject"," Comments"," Keywords"] "this is a \\slashed\\ string containing \\abc\\\, \\def\\\, \\ghi\\\, \\jkl\\\, \\mno\\\, \\pqr\\\, \\stu\\\, \\vwx\\\, and \\yz\\"),anyof(allof(not header :matches ["Subject"," Comments"," Keywords"] ["POSTMASTER-AUTO-FW:*","postmaster-auto-fw:*"],header :matches ["Subject"," Comments"," Keywords"] "*"),true)){
notify :method "email" :echo :options "###@###.###" "POSTMASTER-AUTO-FW:${1}" "This is an auto-forwarded message";
stop;
}
#ENDFILTER
mailSieveRuleSource=#RULE: $Name="quotedAndSlashed" $Order=13 $Type="DEFAULT_TYPE"
require "fileinto";
require "notify";
require "variables";
#BEGINFILTER
if allof(allof(header :contains ["Subject"," Comments"," Keywords"] "output from \"cron\" or \"mon\" or \"bon\" or \"john\" or \"this\" or \"that\"",header :contains ["Subject"," Comments"," Keywords"] "this is a \\slashed\\ string containing \\abc\\\, \\def\\\, \\ghi\\\, \\jkl\\\, \\mno\\\, \\pqr\\\, \\stu\\\, \\vwx\\\, and \\yz\\"),anyof(allof(not header :matches ["Subject"," Comments"," Keywords"] ["POSTMASTER-AUTO-FW:*","postmaster-auto-fw:*"],header :matches ["Subject"," Comments"," Keywords"] "*"),true)){
fileinto "Inbox";
notify :method "email" :echo :options "###@###.###" "POSTMASTER-AUTO-FW:${1}" "This is an auto-forwarded message";
stop;
}
#ENDFILTER
|