[horde] ingo uses wrong user for login

Torben Dannhauer torben at dannhauer.info
Wed Sep 10 13:38:18 UTC 2014


-----Ursprüngliche Nachricht-----
Von: horde [mailto:horde-bounces at lists.horde.org] Im Auftrag von A. Schulze
Gesendet: Mittwoch, 10. September 2014 13:53
An: horde at lists.horde.org
Betreff: Re: [horde] ingo uses wrong user for login


will answer myself:

> my ingo installation does not work as expected and I cannot see why 
> :-/
...
> What did I wrong this time ?
nothing!


I found that ingo always strip the domainpart to login into the managesieve
server.

The difference were my managesieve servers. One (my smaller setup) allow
userpart-only logins The other (enterprise setup) require user at domain for
login.

I assume it's a bug in ingo somewhere and will open a Bug Ticket later...

Andreas

--
Horde mailing list
Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail:
horde-unsubscribe at lists.horde.org


Hi Andreas,

I use a hook to get the credentials to log into the sieve server:

vim ingo/config/hooks.php
 
<?php
/**
 * Ingo Hooks configuration file.
 *
 * THE HOOKS PROVIDED IN THIS FILE ARE EXAMPLES ONLY.  DO NOT ENABLE THEM
 * BLINDLY IF YOU DO NOT KNOW WHAT YOU ARE DOING.  YOU HAVE TO CUSTOMIZE
THEM
 * TO MATCH YOUR SPECIFIC NEEDS AND SYSTEM ENVIRONMENT.
 *
 * For more information please see the horde/config/hooks.php.dist file.
 *
 * $Id: 79a066a891a3356b351dc06b00604919fb0c7adf $
 */
 
class Ingo_Hooks
{
    /**
     * Returns the username/password needed to connect to the transport
     * backend.
     *
     * @param string $driver  The driver name (array key from backends.php).
     *
     * @return mixed  If non-array, uses hordeauth credentials (DEFAULT).
     *                Otherwise, an array with the following keys
     *                (non-existent keys will use default values):
     *  - euser: (string; SIEVE ONLY) For the sieve driver, the effective
     *           user to use.
     *  - password: (string) Password.
     *  - username: (string) User name.
     */
    public function transport_auth($driver)
    {
        switch ($driver) {
        case 'timsieved':
            $ob = $GLOBALS['registry']->call('mail/imapOb');
            if(is_object($ob))
            {
              return array(
                  'euser' => $ob->getParam('username'),
                  'password' => $ob->getParam('password'),
                  'username' => $ob->getParam('username')
              );
            }
        }
 
        // DEFAULT: Use hordeauth (identical to not defining hook at all).
        return true;

    }
 
}

Regards,
Torben



More information about the horde mailing list