[imp] from_addr problem

Thomas GRATTON thomas.gratton at ac-amiens.fr
Thu Apr 13 07:34:42 PDT 2006


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 : : . .



More information about the imp mailing list