[imp] from_addr problem

Xyus whatdoyouwant at gmail.com
Thu Apr 20 06:33:03 PDT 2006


I believe you have to set 'locked' => 'true'
to force it to use the hook.

On 4/13/06, Thomas GRATTON <thomas.gratton at ac-amiens.fr> wrote:
>
> Hello guys,
>
> I tried the new horde 3.1.1 & IMP 4.1.1 yesterday, all works fine except
> one thing.
> The function that get the true email adress in my openLDAP directory,
> from the uid, doesn't work (but worked fine with an other horde 3.x &
> IMP 4.x versions).
>
> ---[ horde/conf/hooks.php ]---
>
> if (!function_exists('_prefs_hook_from_addr')) {
>      function _prefs_hook_from_addr($name = null)
>      {
>          if (is_null($name)) {
>              $name = Auth::getAuth();
>          }
>          if (!empty($name)) {
>              $uid = Auth::getAuth();
>              $cmd = "ldapsearch -LLL -x -u -b 'dc=mydomain,dc=com'
> 'uid=".$uid."' mail | grep mail";
>              $mails = `$cmd`;
>              $mail_array = explode(":", $mails);
>              $mail = $mail_array['1'];
>
>              return (empty($mail) ? '' : $mail);
>          }
>
>          return '';
>      }
> }
> -----------
>
> The horde/prefs.conf contains the call of this function :
>
> -----------
> $_prefs['from_addr'] = array(
>     'value' => '',
>     'locked' => false,
>     'shared' => true,
>     'type' => 'text',
>     'hook' => true,
>     'desc' =>  _("Your From: address:")
> );
> -----------
>
> When i put the line *$conf['hooks']['username'] = false;* in the
> horde/config/conf.php or in horde/imp/config/conf.php the result is the
> same when i try to compose a new message (it put the uid at domain.com but
> not the correct email adress). I've tried to reload or restart the httpd
> service to purge php sessions but nothing, same thing with my browser...
>
> Any ideas ?
>
> thanks for any answers.
>
> --
> Thomas
>         (o_
> (o_    //\
> (/)_   V_/_  Linux pour tous : : . .
>
> --
> IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org
>


More information about the imp mailing list