[Kolab-devel] gunnar: server/kolab-filter/filter config.php, 1.3, 1.4 kolabfilter.php, 1.2, 1.3 kolabmailboxfilter.php, 1.2, 1.3

Gunnar Wrobel wrobel at pardus.de
Mon Dec 3 09:41:35 CET 2007


Hi Richard,

sorry for the delay on this one. I was too busy with getting the last
pieces of functionality in before the beta. Most of your analysis is
quiet correct. Thanks a lot for your work on this.

Richard Bos <ml at radoeka.nl> writes:

> Op Thursday 29 November 2007 13:29:13 schreef Richard Bos:
>> So, actually what you really want is a script, that converts the resmgr
>> conf template in this config.php isn't it.  I tried to accomplish that, and
>> I'm almost there, but the @@@if etc thingies.  Perhaps someone else knows a
>> solution for that??
>
> I changed the script language from bash to perl, and copied some of code from 
> server/kolabconf/lib/Kolab/Conf.pm   The result is now quite nice, almost 
> perfect :)

Definitely the correct solution to the problem.

> Please find the new perl script attached. 

Thanks for the script!

> The diff between config.php and de 
> converted resmgr.conf template is shown below:
>
> 43c43
> < $conf['filter']['lmtp_host'] = $conf['filter']['imap_server'];
> ---
>> $conf['filter']['lmtp_host'] = 'localhost';
>
> Explainable and acceptable diff.
>
> 75c75
> < $conf['filter']['verify_from_header'] = true;
> ---
>> $params['verify_from_header'] = ('true'=='TRUE');
> 83c83
> < $conf['filter']['allow_sender_header'] = true;
> ---
>> $params['allow_sender_header'] = ('true'=='TRUE');
>
> Is  ('true'=='TRUE')  okay here?

I don't think so. You script sets

$Kolab::config{"kolabfilter-verify-from-header"} = "true";

so you do end up with ('true'=='TRUE'). On a normal Kolab server the
webadmin will instead set

kolabfilter-verify-from-header: TRUE

You should be able to verify that by checking the k=kolab object in
your LDAP tree.

The reason why we have this strange construct

@@@if kolabfilter-verify-from-header@@@
$conf['filter']['verify_from_header'] = ('@@@kolabfilter-verify-from-header@@@'=='TRUE');
@@@else@@@
$conf['filter']['verify_from_header'] = false;
@@@endif@@@

for this setting is the fact that the value may be either unset, TRUE
or FALSE. The construct should be able to deal with all three
possibilities.

>
> 88c88
> < $conf['filter']['reject_forged_from_header'] = false;
> ---
>> $params['reject_forged_from_header'] = false;
>
> It looks like $params should be changed to $conf['filter'] isn't it?

Yes, absolutely. I fixed that in CVS. Thanks for the correction.

>
>
> 121c121
> < $conf['filter']['priv_key_file'] = '@sysconfdir@/kolab/res_priv.pem';
> ---
>> $conf['filter']['priv_key_file'] = '/kolab/etc/kolab/res_priv.pem';
>
> Seems an error in config.php
>

Yes, fixed.

>
> 130c130
> < $conf['filter']['freebusy_url'] 
> = 'http://kolab.example.com/freebusy/${USER}.xfb';
> ---
>> $conf['filter']['freebusy_url'] = 'kolab.example.com/freebusy/${USER}.xfb';
>
> Seems an error in config.php
>

Also an error in the resmgr.conf since this lacks the http://. Fixed
in both and I exchanged the hostname to "localhost".

>
> 133c133
> < $conf['filter']['pfb_trigger_url'] 
> = 'http://@@@fqdnhostname@@@/freebusy/trigger/${USER}/${FOLDER}.xpfb';
> ---
>> $conf['filter']['pfb_trigger_url'] 
> = 'https://kolab.example.com/freebusy/trigger/${USER}/${FOLDER}.xpfb';
>
>
> Seems an error in config.php

Yes, fixed to 

$conf['filter']['pfb_trigger_url'] = 'https://localhost/freebusy/trigger/${USER}/${FOLDER}.xpfb';

>
> Should the script be stored in cvs (in the kolabd/kolabd/templates directory).

I would suggest moving it into the "utils" directory in CVS. And then
we should add the necessary instructions in the template.

Thanks a lot for your analysis!

Cheers,

Gunnar

>
>
> -- 
> Richard Bos
> Without a home the journey is endless
>
> _______________________________________________
> Kolab-devel mailing list
> Kolab-devel at kolab.org
> https://kolab.org/mailman/listinfo/kolab-devel

-- 
______ http://kdab.com _______________ http://kolab-konsortium.com _

p at rdus Kolab work is funded in part by KDAB and the Kolab Konsortium

____ http://www.pardus.de _________________ http://gunnarwrobel.de _
E-mail : p at rdus.de                                 Dr. Gunnar Wrobel
Tel.   : +49 40 432 72335                           Bundesstrasse 29
Fax    : +49 40 432 70855                            D-20146 Hamburg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   >> Mail at ease - Rent a kolab groupware server at p at rdus <<                 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




More information about the devel mailing list