[imp] some ideeas?

Sven 'Darkman' Michels darkman@gmx.net
Fri, 01 Mar 2002 20:23:04 +0100


Chuck Hagenbuch wrote:
> 
> Quoting Mario Roeber <mario@port-x.de>:
> 
> > if use turba and put some adresse in the book this work. but if i use the
> > litle bouttom in IMP (litle green book) this dont work.
> 
> Can you be more specific than that it doesn't work?

i think this is the book with adding users to the adressbook,
like the archives said, fix it:

line 93 in turba/lib/api.php:
$res->count() > 0 instead of count($res) > 0
(if i remember right, doesnt have the original source now..)


>From eculp@encontacto.net Date: Fri,  1 Mar 2002 11:31:54 -0800
Return-Path: <eculp@encontacto.net>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 81549 invoked from network); 1 Mar 2002 19:31:56 -0000
Received: from adsl-64-173-182-158.dsl.mtry01.pacbell.net (HELO encontacto.net) (64.173.182.158)
  by clark.horde.org with SMTP; 1 Mar 2002 19:31:56 -0000
Received: from localhost (localhost [127.0.0.1])
  (uid 0)
  by encontacto.net with local; Fri, 01 Mar 2002 11:31:54 -0800
Received: from 64.173.182.155 ( [64.173.182.155])
	as user eculp@mexcomusa.net@mail.mexcomusa.net by Mail.MexComUSA.Net with HTTP;
	Fri,  1 Mar 2002 11:31:54 -0800
Message-ID: <1015011114.3c7fd72ad5060@Mail.MexComUSA.Net>
Date: Fri,  1 Mar 2002 11:31:54 -0800
From: Edwin Culp <eculp@encontacto.net>
To: imp@lists.horde.org
References: <E16gq9R-0007YN-00@cougar.wmin.ac.uk> <1015006592.3c7fc580daaef@marina.horde.org>
In-Reply-To: <1015006592.3c7fc580daaef@marina.horde.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Originating-IP: 64.173.182.155
Subject: Re: [imp] auto-selection of servers

I use that for virtual hosting to determine the domain and to login in
as eculp rather than eculp@encontacto.net as courier requires with hosted
domains. I just made one little change in a return:

$conf['hooks']['vinfo'] = 'imp_get_vinfo';
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') {
// original  return preg_replace('|\.|', '_', $imp['user'] . '@' . $vdomain);
             return $imp['user'] . '@' . $vdomain;
        } elseif ($type == "vdomain") {
            return $vdomain;
        } else {
            return new PEAR_Error('invalid type: ' . $type);
        }
    }
}
Takes the typing out of it.  Courier is happy and my virtual users are happy.

ed

Quoting Chuck Hagenbuch <chuck@horde.org>:

> Quoting Mike Knell <M.Knell@westminster.ac.uk>:
> 
> > Here's the question -- where should I plug in the bit of code (which we
> > originally wrote for our old Silkymail installation) to do this
> correctly?
> 
> $conf['hooks']['vinfo']
> 
> -chuck
> 
> --
> Charles Hagenbuch, <chuck@horde.org>
> "A dream which helps you to live your reality with dignity
>  and justice is a good dream." - Tariq Ramadan
> 
> -- 
> IMP mailing list: http://horde.org/imp/
> Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
> 
> 




-------------------------------------------------