[ingo] Current status on multiple backends for sieve?

Rafael Varela Pet srrafa at usc.es
Wed May 30 12:56:18 UTC 2007


Hi,
El mié, 30-05-2007 a las 09:29 -0300, D G Teed escribió:

> On the FAQ I read the suggestion to set up multiple ingo instances
> to support more than one backend to ingo.  In my case I have
> 3 cyrus servers one can login to from imp, and I'd like the
> filter option to work with the corresponding cyrus imap server
> running its own timsieved.


Our solution was putting some PHP logic in backends.php. Basically, we
populate the backends array comparing the name of the IMAP server where
the user logs with the preferred field of the available backends.


Our configuration looks like this: 



$availableBackends['foo'] = array(
    'driver' => 'null',
    'preferred' => 'foo.company.com',
    'hordeauth' => true,
    'params' => array(),
    'script' => 'imap',
    'scriptparams' => array()
);




$availableBackends['bar'] = array(
    'driver' => 'timsieved',
    'preferred' => 'bar.company.com',
    'hordeauth' => true,
    'params' => array(...)
);






$backends['default'] = $availableBackends['foo'];

$currentServer = $GLOBALS['registry']->call('mail/server');


/*
  Selects a backend using 'preferred' field 
*/

foreach ($availableBackends as $temp) {
    if (!empty($temp['preferred'])) {
        if (is_array($temp['preferred'])) {
            foreach ($temp['preferred'] as $val) {
                if ($val == $currentServer) {
                    $backends['default'] = $temp;
                }
            }
         } 
         elseif ($temp['preferred'] == $currentServer) {
            $backends['default'] =  $temp;
        }
    }
}



> In 2005 there was a patch suggested against an earlier
> Ingo.php to support this, but someone replied this was
> not the right approach to reference session variables inside Ingo.php
> 
> The old horde we have in production currently runs
> multiple ingos as the workaround.  I'd like to implement
> something easier to access than that.
> 
> If multiple backends isn't possible, then can anyone suggest
> an easy way to add the multiple ingo instances to the imp
> menu so people can pick the correct filter for their server?
> I thought I saw an Administration item for editing the horde
> menu with additional links, but I don't see it now.


Regards,

-- 
Rafael Varela Pet
Area de Tecnoloxías da Información e Comunicacións

Universidade de Santiago de Compostela
15782 Santiago de Compostela
http://www.usc.es/atic



More information about the ingo mailing list