[imp] Re: Horde/IMP Login

Fernando Seijas webmaster at slke.org
Mon Dec 2 18:48:44 2002


Hello again!

Thank you for you help, but I can not do it. I will explain more exactly my 
configuration:

I use IMP 3.0 and the conf.php contains this part:

// If this is set to a function name, that function will be used to
// set the $imp['user'] at login time; See the 'imp_get_vinfo'
// function below for an example.
$conf['hooks']['vinfo'] = ' ??????????? ';
/* Here is an example imp_get_vinfo function. If $type == 'vdomain',
 * this function returns the HTTP_HOST variable after removing the
 * 'mail.' subdomain.
 *
 * If $type == 'username', this function returns a unique username
 * composed of $imp['user'] + vdomain.
 *
 * ex. $HTTP_HOST = 'mail.mydomain.com', $imp['user'] = 'myname'
 *   $vdomain  = 'mydomain.com'
 *   $username = 'myname_mydomain_com'
 */
if (!function_exists('imp_get_vinfo')) {
    function imp_get_vinfo ($type = 'username') {
         global $conf, $imp;

         $vdomain = getenv('HTTP_HOST');
         $vdomain = preg_replace('|^mail\.|i', '', $vdomain);
         $vdomain = strtolower($vdomain);

         if ($type == 'username') {
             return preg_replace('|\.|', '_', $imp['user'] . '_' . $vdomain);
         } elseif ($type == "vdomain") {
             return $vdomain;
         } else {
             return new PEAR_Error('invalid type: ' . $type);
         }
     }
 }

I would like to ask you what I must changed to have a login just with the 
username and not @example.com
I am using a virtual subdomain: subdomain.example.com
How it will be configurated?
I have testing a lot of configurations changing this part of out conf.php (IMP)
but we can not login.

Thank you in advance for your support and help to us.


Fernando Seijas
Webmaster
SLKE.ORG


> ------------------------------
> 
> Date: Sun,  1 Dec 2002 18:07:48 -0800
> From: eculp@encontacto.net
> To: imp@lists.horde.org
> Subject: Re: [imp] Horde/IMP Login
> Message-ID: <1038794868.3deac074f2fd3@Mail.EnContacto.Net>
> In-Reply-To: <20021201200005.7D67E68D@vlad.horde.org>
> References: <20021201200005.7D67E68D@vlad.horde.org>
> 	<20021201200005.7D67E68D@vlad.horde.org>
> Content-Type: text/plain
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Precedence: list
> Message: 6
> 
> Quoting Fernando Seijas <webmaster@slke.org>:
> 
>  | Hello,
>  | 
>  | Anybody know how to use a username in IMP without @example.com ? We would
>  | like
>  | to use only the username and not: username@example.com to login in IMP or
>  | Horde.
>  | How must be configurated the servers.php file?
> 
> If you are only using one domain name, I think you can just add the domain
> name as the value of realm in the servers.php file.  If you have virtual
> domains you will probably want to look at imp_hook_vinfo in either
> horde/hooks.php or horde/imp/config/conf.php depending on the version
> of horde/imp that you are using.  The function itself will be the same
> only the location changes, IIRC.
> 
> ed
> 
>  | 
>  | Thank you in advance.
>  | 
>  | Fernando Seijas
>  | Webmaster
>  | SLKE.ORG
>  | 
>  | 
>  | 
>  | --
>  | 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