[imp] how can i avoid users having to log in with user@domain
?
eculp at encontacto.net
eculp at encontacto.net
Thu Mar 13 16:28:18 PST 2003
Mensaje citado por Hector Lecuanda <mailadmin at lecuanda.com>:
| Hello, all.
|
| Here is my situation:
| I have two separate servers, one exclusively for web
| the other exclusively for email/imap/pop:
|
| my software versions:
| (web side)
| imp-3.1_3
| horde-2.2.1_1
| mod_php4-4.2.3
| apache+mod_ssl-1.3.27+2.8.11
| FreeBSD 4.7-RELEASE
|
| (email side)
|
| MDaemon SMTP/POP/IMAP server: v6.7.6
| Microsoft windows 2000 Server
|
| -0-0-0-0-0
| I also have configured several virtual domains, both web-side and
| server-side,
| and i am using a single imp/horde installation to service all of them. It
| works
| perfectly fine, and all domains can send/recieve email correctly. i am using
| the $_SERVER['SERVER_NAME'] variable to sort them out on virtual hosts and
| provide a customized 'welcome to mail.virual-domain.tld' message on the imp
| login screen already.
|
| the problem is that MDaemon requires users on virtual hosts to log in as
| user at virtual-domain.tld
|
| this has several drawbacks, as the horde home page will show
| 'Welcome user at virual-domain.tld@virtual-domain.tld' on the header
Sounds like you may have realm defined in imp/servers.php
|
| what i would like to do, is to be able to have my users log in as 'username'
| only instead of 'username at virtual-domain.tld', but still send the login
| request
| to the mail server as 'username at virtual-domain.tld', determining the
| 'virtual-
| domain.tld' part from the $_SERVER[SERVER_NAME] variable in a similar fashion
| to the server config file.
You might want to try the vinfo hook that is either in horde/hooks.php or
imp/conf.php depending on the version. I'm copying the one I use in
head just as an example. You will also need to set vinfo in imp/conf.php.
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']));
if ($type == 'username') {
return $_SESSION['imp']['user'] . '@' . $vdomain;
} elseif ($type == "vdomain") {
return $vdomain;
} else {
return new PEAR_Error('invalid type: ' . $type);
}
}
}
You will probably find a better way to do it but this one does work. If you
have any questions, let me know.
ed
|
| i bet that will get rid of the duplicate domain name on the horde main
| screen.
|
| has anyone encountered a similar situation?
| if so.. have you been able to resolve it..
|
| im sure that it is something trivial, but i'm missing the point.
|
| Best Regards
|
|
|
|
| --
| http://lecuanda.com
| <a href=http://lecuanda.com>website</a>
|
| -------------------------------------------------
| This mail sent through IMP: http://horde.org/imp/
|
| --
| 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