toying with SIEVE and ldap
Adam Tauno Williams
awilliam at whitemice.org
Wed Dec 1 14:00:16 EST 2010
On Wed, 2010-12-01 at 13:50 -0500, Chris Conn wrote:
> Hello,
> I'm toying with a Horde module that allows to create SIEVE filters and
> store them in an ldap directory.
Neat. Sadly it is probably just this side of worthless.
> This works, however I haven't found
> any documentation as to how it might be (is it?) possible to read these
> filters from the mailSieveRuleSource: of a ldap dn.
> The module is Ingo, and it seems to convert a vacation message into;
Whenever you see a double colon in LDIF it means the subsequent data is
base64 encoded.
So
> mailSieveRuleSource::
> IyBTaWV2ZSBGaWx0ZXIKIyBHZW5lcmF0ZWQgYnkgSW5nbyAoaHR0cDov
> L3d3dy5ob3JkZS5vcmcvaW5nby8pICgxMi8wMS8yMDEwLCAxMTo0NjoxNCBBTSkKCnJlcXVpcmUgW
> yJ2YWNhdGlvbiIsICJyZWdleCJdOwoKIyBWYWNhdGlvbgppZiBhbGxvZiAoIG5vdCBleGlzdHMgWy
> JsaXN0LWhlbHAiLCAibGlzdC11bnN1YnNjcmliZSIsICJsaXN0LXN1YnNjcmliZSIsICJsaXN0LW9
> 3bmVyIiwgImxpc3QtcG9zdCIsICJsaXN0LWFyY2hpdmUiLCAibGlzdC1pZCIsICJNYWlsaW5nLUxp
> c3QiXSwgbm90IGhlYWRlciA6Y29tcGFyYXRvciAiaTthc2NpaS1jYXNlbWFwIiA6aXMgIlByZWNlZ
> GVuY2UiIFsibGlzdCIsICJidWxrIiwgImp1bmsiXSwgbm90IGhlYWRlciA6Y29tcGFyYXRvciAiaT
> thc2NpaS1jYXNlbWFwIiA6bWF0Y2hlcyAiVG8iICJNdWx0aXBsZSByZWNpcGllbnRzIG9mKiIgKSB
> 7IAogICAgaWYgaGVhZGVyIDpyZWdleCAiUmVjZWl2ZWQiICJeLiooMjAxMCkgKFxcKC4qXFwpICk/
> Li46Li46Li4gKFxcKC4qXFwpICk/KChcXCt8XFwtKVtbOmRpZ2l0Ol1dezR9fC57MSw1fSkoIFxcK
> C4qXFwpKT8kIiB7CiAgICB9Cgp9Cg==
is
<BEGIN>
require ["vacation", "regex"];
# Vacation
if allof ( not exists ["list-help", "list-unsubscribe",
"list-subscribe", "list-owner", "list-post", "list-archive", "list-id",
"Mailing-List"], not header :comparator "i;ascii-casemap" :is
"Precedence" ["list", "bulk", "junk"], not header :comparator
"i;ascii-casemap" :matches "To" "Multiple recipients of*" ) {
if header :regex "Received" "^.*(2010) (\\(.*\\) )?..:..:.. (\\(.*\
\) )?((\\+|\\-)[[:digit:]]{4}|.{1,5})( \\(.*\\))?$" {
}
}
<END>
> Is there a way to get Cyrus to read this and apply the sieve filter?
No.
You just enable Ingo to connect to the SIEVE service of the Cyrus
instance. Ingo will continue to store the rules in the user's
preferences [LDAP in your case (and mine)] but must install the script
on the Cyrus instance.
More information about the Info-cyrus
mailing list