[imp] IMP 3.1 / user@domain.ext on virtual domains

eculp at encontacto.net eculp at encontacto.net
Wed Dec 18 06:00:39 PST 2002


Quoting Amith Varghese <amith@xalan.com>:

 | > One difference between what you're offering and what we want to offer is
 | that
 | > we do not want to set up multiple URLs for IMP - ie. mail.domain.ext and
 | > mail.domain2.ext etc - we only want the one instance of IMP being accessed
 | > via
 | > the one single URL at http://webmail2.kabissa.org - at the same time we
 | don't
 | > want preferences to be shared across domains and we want the default
 | identity
 | > to contain the correct email address for the username.
 | 
 | So correct me if I'm wrong, but you basically don't want to use the
 | $_SERVER['SERVER_NAME'] or $HTTP_HOST variable.  You want all users to use
 | your
 | domain when using IMP.  However you also want to be able to differentiate
 | between users from one domain to another.  So for example if you have
 | user@foo.com and user@bar.com you don't want them logging in as user because
 | their prefs will collide.  I think you want to use the vinfo hook but not in
 | the
 | traditional sense.
 | 
 | > My idea for solving the preferences and default identity problem is to
 | have
 | > people log in with their full email address - username@domain.ext - which
 | is
 | > then broken apart to be used as follows:
 | >
 | > username - to log in
 | > username@domain.ext - for preferences in IMP
 | > username@domain.ext - From address for default identity
 | >
 | > 7. I have the idea that this can be handled through hooks, but don't know
 | > enough abou it to know how.
 | 
 | I think you can almost do this with the vinfo hook with a really small code
 | modification.  Basically you will want to enable the vinfo hook, but for
 | just
 | your domain.  So your users are going to log in as
 | 
 | user@foo.bar@kabissa.org
Amith,

Isn't the above the result what you would get just by logging in as
user@foo.bar and having realm=kabissa.org?  I don't think you need
the vinfo hook.  Of course the vinfo hook could add foo.bar to the
uid.  The issue that I can't get through my thick skull is that they 
can't login to the hosting companies courier imap server with @foo.bar. 
They can only login with their uid and password with no hint as to the
domain.  I have no idea how to do that with two domains much less 500. 
Tobias thinks that it is the uid/password combination.  That is well
above my sophistication level.  I personally am missing something here.

Tobias, am I correct in the above description.

ed

 | |----------|
 |     ****
 |      **
 | This is what the user will enter.
 | 
 | The @kabissa.org will be provided by the vinfo hook.  In the vinfo hook you
 | can
 | strip off the @kabissa.org using some PHP code and use that for the user log
 | ins.  So now users such as user@foo.com and user@bar.com are differentiated
 | because internally you store their domain as part of their username.
 | 
 | Then to fix the problem with having the correct e-mail address for the user
 | you
 | need to modify the function _prefs_hook_from_addr() and use PHP to
 | manipulate
 | the username into something that you like.
 | 
 | The only Horde code that you would have to change is in login.inc.  In that
 | file
 | it displays the vdomain (@kabissa.org in your case).  Basically you need to
 | silence the printing of this and I think that should cover all your needs.
 | There might be some option to not display the vdomain, but I don't know of
 | one.
 | 
 | Amith
 | 
 | --
 | IMP mailing list
 | Frequently Asked Questions: http://horde.org/faq/
 | To unsubscribe, mail: imp-unsubscribe@lists.horde.org
 | 


-- 


-------------------------------------------------



More information about the imp mailing list