[imp] How to use imp_get_vinfo
eculp at encontacto.net
eculp at encontacto.net
Thu May 1 13:54:00 PDT 2003
Quoting Thomas O'Brien <helpdesk at naprotek.com>:
| Hello everyone.
|
| First off here's my config.
|
| Horde 2.2.1
| IMP 3.2.1
| Turba 1.2
| All running on Windows 2000 Server (SP3) using IIS. Actually everything is
| running quite nicely on this platform.
|
| Let me preempt all that follows with the fact that I'm no PHP expert either.
|
| I have multiple domains I wish to serve. On the web server side IIS is
| serving
| up my domains just fine. However, I can't figure out the imp_get_vinfo
| function. The logon screen to IMP is appending "@hostname.domain.com". I need
| it to simply append "@hostname.com"
I hope I'm understanding. You probably first want to leave
'realm' => '',
in horde/imp/config/servers.php That could be causing the domain.com to be
added. Your imp configuration from the admin menu will need the vinfo hook
to be enabled, IIRC.
In horde/hooks.php you will need something like the following based on
your setup and my understanding of what you want.
if (!function_exists('_imp_hook_vinfo')) {
function _imp_hook_vinfo($type = 'username')
{
global $conf, $imp;
$vdomain = strtolower(eregi_replace('^mail\.|^www\.|^www\.mail\.',
'', $_SERVER['HTTP_HOST'])); // This should have been one long line
if ($type == 'username') {
return $_SESSION['imp']['user'] . '@' . $vdomain;
} elseif ($type == "vdomain") {
return $vdomain;
} else {
return new PEAR_Error('invalid type: ' . $type);
}
}
}
This is based you your accessing each domain with http://mail.domain.com
http://mail.domain2.com, http://mail.domain3.com, etc.
I hope this gets you started or maybe even finished ;-)
ed
|
| I've searched the archives for info on customizing this function. But I fear
| I've just confused myself. I know that there is some dependency on
| servers.php
| as well, but I'm just not grasping the connection and how to make things work
| for me.
| Do I need and entrry for ever domain I wish to server in the servers.php. If
| so
| what parameters need to be set for the imp_get_vinfo function? Is this all I
| need to concern myself with?
|
| Any help would be greatly appreciated.
|
| --
| IMP mailing list
| Frequently Asked Questions: http://horde.org/faq/
| To unsubscribe, mail: imp-unsubscribe at lists.horde.org
|
--
-------------------------------------------------
More information about the imp
mailing list