[ingo] Wrong auth with Sieve and Hooks

Hanns Mattes hanns at hannsmattes.de
Sat Jan 12 11:46:37 UTC 2013


roellig at roellig-ltd.de schrieb:

>Hi,
>I still have the same problem. login in the sieve is still lacking.
>the login is still part of the truncated domain.
>
>which enable the hooks did not change.

After some trial and error, this is my working hooks.php.

,----[ ingo/config/hooks.php ]
| <?php
| 
| 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 Horde authentication 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':
|              // Example #2: Use IMP password/username.
|              $ob = $GLOBALS['registry']->call('mail/imapOb');
|              return array(
|                  'euser' => $ob->getParam('username'),
|                  'password' => $ob->getParam('password'),
|                  'username' => $ob->getParam('username')
|              );
|          }
| 
|          return true;
|      }
| 
| 
| }
| 
| 
`----

Hth Hanns


More information about the ingo mailing list