[imp] Cyrus "realms" vs IMP "realms"

Edwin Culp eculp@encontacto.net
Mon, 2 Sep 2002 10:43:21 -0700


Quoting "Marc G. Fournier" <scrappy@hub.org>:

 | 
 | 'K, one last one, I hope ...
 | 
 | Other then that error, login works great ... I type in 'admin', it logs in
 | as admin@pluto.hub.org ... but, it then gives me a Welcome of:
 | 
 |  Welcome, admin@pluto.hub.org@pluto.hub.org

Sounds like you haven't set realm to ''.

 | 
 | Takinga  look in imp/lib/Session.php, one of the last things it appeasr to
 | do in setting up the session is authenticate against the IMAP server
 | (around line 139) ... so up until that point, the ['imp']['uniquser'] ist
 | stil set to just admin@pluto.hub.org ... where is it getting tack'd on the
 | extra @pluto.hub.org?

I bet from realm in Session.php about line 72  adds '@' . realm.

 | 
 | From reading the descriptoing of 'realms' in servers.php, I thought that
 | all I had to do is set that to blank to fix that, but that doesn't appear
 | to do it ... somewhere else I have to set this?

unless you are logging in with username@domain.com rather than username, I
don't know of another reason.

ed
 | 
 | thanks ...
 | 
 | On Mon, 2 Sep 2002, Marc G. Fournier wrote:
 | 
 | > On Mon, 2 Sep 2002, Edwin Culp wrote:
 | >
 | > >  | But when I try to login, it only gets the @$vdomain part:
 | > >  |
 | > >  | ...mail.pluto.hub.org:143[imap] as @pluto.hub.org ...
 | > >  |
 | > >  | So, what value should I be setting in there?
 | > >
 | > > I use the following script that will hopefully help as it is a bit
 | different,
 | > > has the vdomain type and has worked for months.  As they say if it works
 | > > don't fix it.
 | > >
 | > >
 | > > $conf['hooks']['vinfo'] = 'imp_get_vinfo';
 | > >
 | > > if (!function_exists('imp_get_vinfo')) {
 | > >      function imp_get_vinfo ($type = 'username') {
 | > >         global $conf, $imp;
 | > >
 | > >         $vdomain = strtolower(preg_replace('|^mail\.|i', '',
 | > > $_SERVER['HTTP_HOST']));
 | > >
 | > >          if ($type == 'username') {
 | > >              return $_SESSION['imp']['user'] . '@' . $vdomain;
 | > >         } elseif ($type == "vdomain") {
 | > >             return $vdomain;
 | > >         } else {
 | > >             return new PEAR_Error('invalid type: ' . $type);
 | > >         }
 | > >     }
 | > > }
 | > >
 | > > Hope this helps,
 | >
 | > Nope, had thought to tried using the $_SESSION stuff, but then I get an
 | > error of:
 | >
 | > Notice: Undefined index: imp in
 | /usr/local/www/pluto.hub.org/horde/imp/config/conf.php on line 312
 | >
 | > if (!function_exists('imp_get_vinfo')) {
 | >     function imp_get_vinfo ($type) {
 | >         global $conf, $imp;
 | >
 | >         $vdomain = getenv('HTTP_HOST');
 | >         $vdomain = preg_replace('|^webmail\.|i', '', $vdomain);
 | >         $vdomain = strtolower($vdomain);
 | >
 | >         return $_SESSION['imp']['user'] . '@' . $vdomain;
 | >     }
 | > }
 | >
 | >
 | >
 | > --
 | > IMP mailing list
 | > Frequently Asked Questions: http://horde.org/faq/
 | > To unsubscribe, mail: imp-unsubscribe@lists.horde.org
 | >


--