[imp] realm problem
eculp@encontacto.net
eculp@encontacto.net
Fri Nov 15 14:52:34 2002
Quoting Marcos Monge <mmonge@satec.es>:
| Hi everybody
|
| I have been reading the archive but don't found a
| solution. I'm using horde 2.1 and IMP 3.1, with mysql, and
| authentication in a IMAP server. I have several IMAP
| servers.
|
| I want that the user select from the login window the
| server (configured in servers.php, with the field realm
| filled with the domain of that server), and that IMP
| append to the username the realm field, like the
| description of "realm" field said.
|
| For example, the user "pepe" must connect to the IMAP as
| "pepe@domain.com". The realm is different for each server.
|
| The problem is that IMP don't use the REALM for nothing ¿?
| I have try a lot of things. I also test with the following
| in imp/config/conf.php:
|
| ---------------------------------
How about adding the following all on one line:
$realm_value = strtolower(preg_replace('/^mail\.|^www\./i', '',
$_SERVER['HTTP_HOST']));
As you can see the potential mail.domain.com or www.domain.com are
filtered out so you only see domain.com in $realm_value.
Saludos,
ed
| $conf['hooks']['vinfo'] = 'imp_get_vinfo';
|
| if (!function_exists('imp_get_vinfo')) {
| function imp_get_vinfo ($type = 'username') {
| global $conf, $imp;
|
| if ($type == 'username') {
| return $imp['user'] . '@' . $realm_value;
| } elseif ($type == "vdomain") {
| return $realm_value;
| } else {
| return new PEAR_Error('invalid type: ' .
| $type);
| }
| }
| }
| -----------------------------------
|
| But the login in IMAP is: "username@" without the realm.
| It's seens that the $realm_value variable is empty.
|
| Someone can help me in something? I'm only want to append
| the realm value in servers.php to the login name in the
| IMAP connection.
|
| Thanks in advance, and greetings from Spain.
|
| Marcos Monge <mmonge@satec.es>
| Sytem Administrator
|
| --
| 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