[ingo] different configuration dependant on used server?

Markus Krause krause at biochem.mpg.de
Fri Sep 22 03:35:50 PDT 2006

Zitat von Chuck Hagenbuch <chuck at horde.org>:
> Quoting Markus Krause <krause at biochem.mpg.de>:
>> but is there a way to configure what i need (different backends for  
>>  different servers) just in the config file?
> Of course, otherwise my rejecting the hook on those grounds would be
> unfair to say the least.
well, as you are one of the core developers i am sure you know best  
how to enhance the functions

>> if so, could you please show me an example?
> Something like:
> [snipp]
thanks, i think i am now getting closer to understanding things! ;-)

in case some one is interested here is my solution:
first the scenario:

we have one horde system running and two different servers which the  
user can choose on the login page: a linux imap server and a ms  
exchange. to speed up things a bit we are using to local (on the  
horde-server) running imapproxies, the one who is listening on port  
8143 forwards requests to the linux imap server, the one on port 9143  
to the exchange. as the exchange does not support procmail we have to  
distinguish between the two depending on the server chosen by the user  
on login.

so thats what i have now in ingo/config/backends.php

if ($GLOBALS['_SESSION']['imp']['port'] == 8143) {
/* configuration for imap server -> procmail */
   $backends['procmail'] = array(
     'driver' => 'vfs',
     'preferred' => '',
     'hordeauth' => true,
     'params' => array(
         'hostspec' => 'imapserv.biochem.mpg.de',
         'filename' => '.procmailrc',
         'port' => 21,
         'vfstype' => 'ftp'
     'script' => 'procmail',
     'scriptparams' => array(
         'path_style' => 'mbox',
         'variables' => array(
else {
/* configuration for exchange server -> filtering by client */
   $backends['imap'] = array(
     'driver' => 'null',
     'preferred' => 'exchange.biochem.mpg.de',
     'hordeauth' => true,
     'params' => array(),
     'script' => 'imap',
     'scriptparams' => array()

feel free to optimize that! ;-)

thanks again for all who made suggestions and helped with this!


Markus Krause                                   email: krause at biochem.mpg.de
Mogli-Soft: Support for Mac OS X, Webmail/Horde, LDAP, RADIUS
by order of the Computing Center of the Max-Planck-Institute of Biochemistry
Tel.: 089 - 89 40 85 99                         Fax.: 089 - 89 40 85 98

      This message was sent using https://webmail.biochem.mpg.de
If you encounter any problems please report to rz-linux at biochem.mpg.de

More information about the ingo mailing list