[horde] Ingo using wrong credentials on AUTHENTICATE PLAIN?

Jens-Uwe Mozdzen jmozdzen at nde.ag
Wed Nov 19 13:26:36 UTC 2014


Hi *,

I got mis-lead by the sample hooks code provided with Ingo - OTOH, the  
comment section in that file explains it all, so here it goes:

Zitat von "Jens-U. Mozdzen" <jmozdzen at nde.ag>:
> [...]
> I log in as "username" (not "username at domain.com") and get  
> successfully authenticated to our Cyrus IMAP server. Horde portal  
> does show "username at domain.com" as the logged-in user.
>
> I have created a hook for Ingo so that the IMAP credentials are to  
> be used when authenticating to the Sieve server (by activating the  
> according piece of code from the hooks.php.dist file).
>
> Whenever I try to update/load/activate Sieve scripts, the Horde UI  
> reports an authentication error.
>
> Debugging Horde/Ingo shows me in the Sieve trace, that the  
> information passed on the "AUTHENTICATE PLAIN" command  
> (base64-encoded) is "username<sep>username at domain.com<sep>password",  
> while I would have expected "username at domain.com<sep>password". (The  
> hook mentioned above makes sure that the fully-qualified username is  
> used - without, it'd send "username<sep>username<sep>password").
> [...]
> --- cut here: horde/ingo/config/hooks.php ---
> <?php
> class Ingo_Hooks
> {
>     public function transport_auth($driver)
>     {
>             $ob = $GLOBALS['registry']->call('mail/imapOb');
>
> //Horde::debug( $ob->getParam('username'));
> //Horde::debug( $ob->getParam('password'));
>             return array(
>                 'password' => $ob->getParam('password'),
>                 'username' => $ob->getParam('username')
>             );
>    }
> }
> --- cut here ---

As the comment block in horde/ingo/config/hooks.php.sample mentions,  
there's a third field that can be returned - "euser". When set to the  
proper user name, then everything works fine.

As a side note: Even the current Cyrus Sieve daemon does not support  
imap4flags (it's in the works, see  
http://lists.andrew.cmu.edu/pipermail/cyrus-devel/2014-October/003006.html),  
so the back-ends configuration should still specify  
"$backends['sieve']['script'][Ingo::RULE_ALL]['params']['imapflags'] =  
true;"

Sorry for the noise,
Jens



-- 
Jens-U. Mozdzen                         voice   : +49-40-559 51 75
NDE Netzdesign und -entwicklung AG      fax     : +49-40-559 51 77
Postfach 61 03 15                       mobile  : +49-179-4 98 21 98
D-22423 Hamburg                         e-mail  : jmozdzen at nde.ag

         Vorsitzende des Aufsichtsrates: Angelika Mozdzen
           Sitz und Registergericht: Hamburg, HRB 90934
                   Vorstand: Jens-U. Mozdzen
                    USt-IdNr. DE 814 013 983



More information about the horde mailing list