[horde] Virtualhost context for hooks

Nels Lindquist nlindq at maei.ca
Thu Jan 11 23:23:18 UTC 2018


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, Jan.

On 2018/01/09 2:09 PM, Jan Schneider wrote:
> 
> Zitat von Nels Lindquist <nlindq at maei.ca>:
> 
>> Hi there.
>> 
>> I'm using a preauthenticate hook to normalize login IDs against
>> an LDAP server.  In each virtualhost configuration file I've
>> defined different LDAP search bases, but my hook functions appear
>> to be using the root Horde search base rather than the
>> virtualhost's overridden configuration.
>> 
>> I'm referincing "global $conf" within my hook functions in order
>> to access $conf['auth']['params']['basedn']; should I be
>> incorporating something else to get the virtualhost overrides?
> 
> No. But you didnt explain how exactly your setup looks like. And
> how about vhost-specific settings used anywhere else than
> hooks.php.

I have Horde Groupware Webmail Edition 5.2.22 installed.  IMP is
configured to connect to Cyrus IMAPD on the local host.
Authentication is through LDAP, using OpenLDAP as the backend.

I'm using vhost-specific settings to define a different database,
administrator ID, cache prfix and authentication base DN for each
domain, as well as default mail domain (for imp) and different LDAP
base DNs for each vhost's turba shared directory.

Note that I'm using a common hooks.php file for all virtual domains
since it's the same function performing the normalization regardless.
 Should there be vhost-specific hooks-*.php files as well?

- ----
Nels Lindquist
<nlindq at maei.ca>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlpX8eYACgkQh6z5POoOLgTcAwCfWc/AiwicmM0BH+1ua3Xp5wgs
n+YAn1hgaKgCVKNuG5RDWP/yJLmpcy4P
=HZND
-----END PGP SIGNATURE-----


More information about the horde mailing list