[ingo] different configuration dependant on used server?
Chuck Hagenbuch
chuck at horde.org
Thu Sep 21 13:27:09 PDT 2006
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.
> if so, could you please show me an example?
Something like:
<?php
$letter = substr(Auth::getAuth(), 0, 1); // first character of username
$backends['foo'] = array(
'driver' => 'timsieved',
'preferred' => 'example.com',
'hordeauth' => true,
'params' => array(
// Hostname of the timsieved server
'hostspec' => $letter . '.mail.example.com',
// ... etc.
);
Or you could use an if () check on whatever ($_SERVER['SERVER_NAME'],
etc.) to pick between two different backends. The possibilities are
pretty much endless.
-chuck
--
"we are plastered to the windshield of the bus that is time." - Chris
More information about the ingo
mailing list