[Kolab-devel] Wallace and Invitation Policies

Sergio Talens-Oliag sto at iti.es
Tue Jan 27 11:45:58 CET 2015


El Sun, Jan 25, 2015 at 10:19:56PM +0100, Jeroen van Meeuwen (Kolab Systems) va escriure:
> On 2015-01-12 16:33, Sergio Talens-Oliag wrote:
> >Hello,
> >
> >I'm working on having a functioning Kolab 3.3 on a Debian server using
> >dovecot 2.2.15 (with the upstream metadata support); I'm not using all the
> >kolab tools, but what I need is almost working.
> >
> >To be able to use the invitation policies module of wallace I've added a
> >dovecot driver to pykolab (it's a quick hack, to distribute it the pykolab
> >imap drivers will need to be reviewed, as there are some assumptions on
> >different places that should be on the cyrus driver but are on the general
> >code, i. e. dovecot does not provide the same namespaces that cyrus does,
> >but
> >there are some checks that expect three namespaces).
> >
> 
> Hi Sergio,
> 
> can you submit these individual changes for inclusion, each by themselves,
> separately, rather than as one big diff with too many individual changes?

Yes, of course, I planed to do it that way and so far I've submitted two bugs,
one is a wishlist bug to add a new policy as already discussed on this list:

  https://issues.kolab.org/show_bug.cgi?id=4269

and the other is the minimal patch I need to make the namespaces problem go
away for me:

  https://issues.kolab.org/show_bug.cgi?id=4277

> If you could do so in "git format-patch" format, so I can preserve both your
> commit messages and your authorship (without manual intervention), that
> would be swill!

I already did it that way, see the patches attached to my bugs:

  https://issues.kolab.org/attachment.cgi?id=933
  https://issues.kolab.org/attachment.cgi?id=940

> Thanks in advance,

With those two patches I have things working, but I had to do some magic in my
pykolab/imap/dovecot.py driver to avoid the need of additional changes on the
pykolab/imap/__init__.py file to make wallace work.

To implement my driver with minimum changes I've replaced the 'getannotation'
and 'setannotation' calls used on the cyrus driver by calls to 'getmetadata' and
'setmetadata', but the behaviour is not 100% compatible because there are some 
differences between the ANNOTATEMORE and METADATA extensions and the current
pykolab uses some ANNOTATEMORE functions that need some tricks.

When wallace has to look at annotations calls the 'get_metadata' function to
get all the mailbox annotations using an '*' filter on the call to get
annotations, although it only needs the '/private/vendor/kolab/folder-type'
and the '/shared/vendor/kolab/folder-type' entries.

To make my driver work I requested those entries when a call was made using
'*' as the entry, but it looked too hackish.

While writing this mail yesterday I reviewed the code and I changed my
implementation to make 'get_metadata' behave more like the ANNOTATEMORE
version; on my latest version when the entry requested is '*' I ask for the
entries '/private' and/or '/shared' with the option '(DEPTH infinity)' and in
my setup it returns all the metadada for each folder (and the /private and/or
/shared entries with a NIL value, but as nothing uses that it does not harm).

If you want to try my latest version of the driver the patch is on the kolab
OBS system:

  https://obs.kolabsys.com/package/view_file/home:sto:branches:Kolab:Development/pykolab/0001-Dovecot-driver.patch?expand=1

It works for me and I guess it could be included on the main repository as
experimental, but I haven't filled a bug because it needs more testing using
other configurations and tools (i. e. I don't use the kolab-admin interface,
so probably there can be bugs I haven't seen).

Greetings,

  Sergio

-- 
Sergio Talens-Oliag <sto at iti.es>               <http://www.iti.es/>
Key fingerprint = FF77 A16B 9D09 FC7B 6656 CFAD 261D E19A 578A 36F2


More information about the devel mailing list