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

Tobias Eigen tobias at kabissa.org
Tue Dec 17 22:51:42 PST 2002


Hi Amith, 

Thanks for your help. I think you've nearly got it - the only change I'd make 
is that I want the hook to strip off not only the @kabissa.org in what you 
described, but also the @foo.com or @bar.com - for the login to IMAP. For IMP 
prefs and the default identity I'd like to keep user@foo.com and user@bar.com 
as you described so these can be kept apart. 

Would it be possible to do this with the vinfo hook? 

Cheers,

Tobias

-- 
Tobias Eigen
tobias@kabissa.org

Kabissa - Space for change in Africa
http://www.kabissa.org


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
> |----------|
>     ****
>      **
> 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