[imp] Using Virtual domain logins - POP3 ---IMPORTANT---

Alejandro Kapit admin at confortsur.com
Wed Mar 5 16:23:31 PST 2003


Hi people!!

I was readed the message on the archives "[imp] Using Virtual domain logins
- IMAP" that was wrote bye "eli at experthost.com".


This mail explains how to login with email address and password using
virtual domain login.

But I cannot make it run...

This is the function in conf.php:

imp/config/conf.php (this is a vinfo hook function):

///////////////////////////////////////////////////////////////
$conf['hooks']['vinfo'] = 'imp_get_vinfo';

if (!function_exists('imp_get_vinfo')) {
    function imp_get_vinfo () {
        global $imp, $servers, $HTTP_POST_VARS;

        if (preg_match('/(.*)@([\w\-\.]+)$/', $imp['user'], $matches)) {
            $imp['user'] = $matches[1];
            $vdomain = strtolower($matches[2]);

            if (getmxrr($vdomain, $matches)) {
                $mserver = strtolower($matches[0]);
            }
            else {
                $mserver = $vdomain;
            }

            $servers["${HTTP_POST_VARS['server']}"]['server']     =
$mserver;
            $servers["${HTTP_POST_VARS['server']}"]['smtphost']   =
$mserver;
            $servers["${HTTP_POST_VARS['server']}"]['maildomain'] =
$vdomain;
        }

        return $imp['user'];
    }
}
///////////////////////////////////////////////////////////////

Any ideas?



More information about the imp mailing list