On Mon, Nov 11, 2002 at 11:40:39PM -0700, Chad Leigh -- Shire. Net LLC wrote:
> I am using courier-imap with exim MTA and ldap based (custom written) 
> configuration in a pure virtual setting.

Same here :-)

> I would like to migrate to a 
> different way of doing things, which would necessitate a change in the 
> users "login" name.  I would like to be able to support my "old way" as 
> well as the new way.  Doing so would require rewriting what the user 
> passes as his login name before it gets queried by ldap.
> 
> Here is the line in the imapd/popd config files
> 
> 
> LDAP_MAIL               loginName
> 
> 
> Say the user has a login name (ie, what he passes as his ID to login to 
> his account through courier-imap)  "foo=domain.com" and I would like 
> that to be changed to "foo!domain.com" before I do the lookup in ldap.  
> Is there a way to do that in courier-imap?

Remember that LDAP allows attributes to be multi-valued. So on solution is
to simply put both values in LDAP against the same record:

loginName:      foo=domain.com
loginName:      foo!domain.com

Courier doesn't do username rewriting. When I've had to do this in the past,
I've used a POP3 proxy (smunge) with a small hack to rewrite usernames -
this meant it could be put in front of any mail server.

Hacking Courier's authlib to do what you want should be possible, but it
takes a bit of work to get your head around it :-) See authlib(7)

(Incidentally I don't know if those are real loginName formats, but in my
experience mail clients these days don't object to '@' signs in usernames -
i.e. [EMAIL PROTECTED] works just fine)

Regards,

Brian.


-------------------------------------------------------
This sf.net email is sponsored by: 
To learn the basics of securing your web site with SSL, 
click here to get a FREE TRIAL of a Thawte Server Certificate: 
http://www.gothawte.com/rd522.html
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to