[imp] Change login data ("user") for full addr ("user at example.com") using IMAP

Alvaro Uría fermat at rigel.deusto.es
Tue Jun 26 17:02:10 UTC 2007


Hi all!

First of all, I'm very new to Horde-IMP administration, so feel free to
point me to some documentation (though I've checked some of it, most of
the official one, and faqs).

What I would like to know is if I can rewrite "imapuser" after
authenticating to an IMAP server.

I mean, I log in with a "user" and a "password", that can be authenticated,
and I would like to change that "user" with the full address returned by
the IMAP server ("user at example.com", or "user at subdomain.example.com", etc.)

I've been looking for vinfo hooks, but I think this is thought for being
used before any authentication, (and to change $_SESSION["imp"]["user"]).

I've also been looking for IMAP functions on PHP and I haven't seen anyone
like "imap_get_username" or so (maybe that can't be done).

The database being checked by IMAP has 4 fields (amongst others):
	- adresss (which has "username+ at its_virtual_domain")
	- password
	- username
	- maildir
	- ...

...and I usually authenticate using "username" and "password", but I need
Horde to know the "address" for not using a default domain when sending
emails, etc. (BTW, I can also use "address" and "password" for
authentication, but it's more... handy to use the "username" only. I tell
you that because it's not a problem once the "imapuser" has been changed
just after logging in if it's used to authenticate again)

Can I do this, or should I create a hook before authentication for making a
query to the database and get the address?

Thanks in advance, and please ask me if you want more info about that :-)

Cheers,
  Alvaro.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.horde.org/archives/imp/attachments/20070626/da7151d9/attachment.bin 


More information about the imp mailing list