GOMBAS Gabor wrote:
>
> On Sun, Apr 08, 2001 at 12:56:31PM -0400, Marc Tardif wrote:
>
> > I will be releasing these two patches to the mailing list this
> > week, so stay tuned. Perhaps eventually these patches will find
> > their way into the cyrus code and will save us the trouble of
> > mucking around to get LDAP support.
>
> Well, if you want to do it, then do it right and provide a generic mapping
> layer like Postfix has. LDAP is nice and cool, but a simple regexp map
> would be a _lot_ faster for transforming "[EMAIL PROTECTED]" to either
> "atif_4unet_net" or "uid=atif, dc=4unet, dc=net, ou=Users, ...". And such a
> layer could also be used to transform MUA-specified folder names to on-disk
> path names solving the separator problem on-the-fly...
>
True, speed of transformation could be an issue for some. On the other
hand, using regexp would defeat the purpose of LDAP.
For example, lets say you have two addresses which map to the same
mailbox: [EMAIL PROTECTED] and [EMAIL PROTECTED] (this is practical when
people have different domains according to language). If you simply
performed a regexp transformation, gombas_foo_com and gombas_bar_com
would not return the same mailbox. On the other hand, consider the
following LDAP entry:
uid: [EMAIL PROTECTED]
uid: [EMAIL PROTECTED]
mailfoldermap: gombas_foo_bar_com
So if you login as "[EMAIL PROTECTED]" or "[EMAIL PROTECTED]", LDAP would
always return the same mailbox. It seems that this approach is the
"right" way to provide proper LDAP support, but I am still open to
suggestions.
Also note that my LDAP support includes proper configuration directives
in the imapd.conf file which means no hard-coded LDAP filters. Here's
an example from my previous message of what part of the configuration
file might look like (I have used the same keywords as Postfix):
# IMAP configs for LDAP
imap_ldap_search_base: o=internet
imap_ldap_server_host: localhost
imap_ldap_server_port: 389
imap_ldap_query_filter: (&(uid=%s)(objectClass=spUser))
imap_ldap_result_attribute: mailFolderMap
Marc - Sitepak