[imp] domain in imp_get_vinfo
Marcos Monge
mmonge@satec.es
Tue Nov 19 16:42:00 2002
Nate Mollring wrote:
>>>>I have IMP in one web server (only 1 web domain), and multiple imap
>>servers,
>>
>>>>configured in servers.php, each server with his own maildomain/realm
>>>
>>value.
>>
>>>>My users are in ldap. The mail address and the uid are different (the login
>>>
>>>>in the imap server must be with uid)
>>>>
>>>>I want that the users do login via web using his mail address (only the
>>>>first part), and choose the server. For example:
>>>>
>>>>uid=pepe
>>>>mail=jose@subdomain1.domain.com
>>>>
>>>>I want the user only put "jose" in the login screen, and choose
>>>>"@subdomain1.domain.com" from the server list.
>>>
>>>If you want to login using the mail userid, use imap to authenticate.
>>
>>This is what I'm using... In servers.php I have several servers (all IMAP),
>>each with a different subdomain.
>>
>>I need that this domain defined in servers.php is avalaible in imp_get_vinfo
>>
>>function, to compose the mail addres of the user, and search in the ldap for
>>
>>the correct UID that will be used to connect to the IMAP server.
>>
>>The user type the first part of his email addres, his password, and choose
>>the
>> adecuate server. I need the value of "maildomain" or "realm" that is
>>configured in servers.php for that server, in the imp_get_vinfo function, but
>>
>>I don't know the variable that contains this data. I have tried with the
>>variable $realm, and $realm_value without success :(
>>
>
> Just so I understand, your userid's to login in to the mail server aren't the
> same as the first part of the email(before the @)--why is that? You want your
> users to be able to login using the first part of their email as the userid,
> but behind the scenes you need imp to login to the mail server using the actual
> userid? It sounds like it's beyond the scope of what I can help you with.
> Nate
Yes, more or less.
Each user in the ldap hava something similar to:
uid=mju2342
mail=pgarcia@subdom.domain.com
To login in the IMAP server, you must connect as "mju2342". But I want that
the user put in the login screen his email addres (first part) and choose the
server (and each server has configured the domain in servers.php).
I have modified the imp_get_vinfo to lookup in the ldap for a user with
mail=login, and return the value of the uid filed. This work without problem.
My only problem is how to append the domain configured in servers.php for the
server that the user select, to the login to do the correct search in the ldap
(mail=what_the_user_type@subdomain.configured.for.that.server.in.servers.php).
I only need to know the variable that contains
"subdomain.configured.for.that.server.in.servers.php".
--
Un Saludo
Marcos Monge <mmonge@satec.es>
Area de Sistemas
More information about the imp
mailing list