[dev] Horde and IMP with sendmail virtual users

dimon@intellinetinc.com dimon@intellinetinc.com
Thu, 27 Jun 2002 19:42:38 -0600


Thank you all,

I think I found the reason:
In file imp/lib/IMP.php there are strings:
if (!empty($conf['hooks']['vinfo']) && function_exists($conf['hooks' 
['vinfo'])) {
    $imp['user'] = call_user_func($conf['hooks']['vinfo']);
}

and they were BEFORE $imp array was created (except $imp['user'] variable)!!!
So I just moved them AFTER all variables regarding servers were created.
May be it's wrong, I don't know, but I think it works! And I also added
$imp['realm'] = $servers[$server]['realm'];
because it was missing :-(

Is it possible to include that fix in CVS (if it'r right and doesn't brake 
anything of course)?

Best regards,
Dmitry


Quoting Edwin Culp <eculp@encontacto.net>:

> Quoting dimon@intellinetinc.com:
> 
>  | 
>  | OK, thank you for the advise, I started to learn how to use hook feature.
>  | 
>  | As I understand, I can use all horde & imp config parameters in hook
>  | functions, 
>  | right? So I'm trying to make a database query and I need
> $imp['maildomain'] 
>  | variable, but for some reason I can't get it in my function :-( Everything
>  | I've 
>  | got with print_r(array_keys($imp)) is Array ( [0] => user ) 
>  | 
>  | Is there a way of getting $imp['maildomain'] in my hook function? And why
> it
>  | 
>  | doesn't show all other array values by the way?
> 
> You might want to try $_SERVER['HTTP_HOST'] or $servers[$server_key]['realm']
> from your servers.php.  I think $realm_value is also available which is also
> equal to the realm value that you have specified in servers.php.
> 
> ed
> 
>  | 
>  | Best regards,
>  | Dmitry
>  | 
>  | > Quoting dimon@intellinetinc.com:
>  | > 
>  | > > I have an idea and I'm willing to implement to horde and IMP the
> support
>  | > > of sendmail virtual users feature. Since so many people using that 
>  | > > feature I think it make sence to do that.
>  | > 
>  | > I don't think there's anything you describe that can't be done with the 
>  | > vinfo hook.
>  | > 
>  | > -chuck
>  | > 
>  | > --
>  | > Charles Hagenbuch, <chuck@horde.org>
>  | > "After a few minutes the most aromatic and nice smelling Italian coffee 
>  | >  will come out of the exhaustpipe." - Our stove-top espresso pot
>  | > 
>  | > -- 
>  | > Horde developers mailing list
>  | > Frequently Asked Questions: http://horde.org/faq/
>  | > To unsubscribe, mail: dev-unsubscribe@lists.horde.org
>  | 
>  | 
>  | 
>  | 
>  | -- 
>  | Horde developers mailing list
>  | Frequently Asked Questions: http://horde.org/faq/
>  | To unsubscribe, mail: dev-unsubscribe@lists.horde.org
> 
> 
> -- 
> 
> -- 
> Horde developers mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe@lists.horde.org