jason kawaja | 10 Jul 2012 15:05
Picon
Favicon

multiple imap servers

greetings list, been running version 3 for a long while and i must be missing something obvious as i was
reading http://wiki.horde.org/ImapSelect and have the following in my setup :

horde/imp/config/conf.php

<?php
$conf['hooks']['preauthenticate'] = true;
...

horde/imp/config/hooks.php

<?php

if (!function_exists('_horde_hook_preauthenticate')) {
    function _horde_hook_preauthenticate($userID, $credential, $realm)
    {
        require dirname(__FILE__) . '/../imp/config/servers.php';

        // Convert all to lower chars (even the possible domain part)
        $userID=strtolower($userID);
        // Strip domain part from user, if it exists.
        if (($domainpart = strpos($userID, ' <at> '))) {
          $server=substr($userID, $domainpart+1);
          $userID=substr($userID, 0, $domainpart);
          // Change the values only if a domain part was found ...
          if (!empty($server)) {
            foreach ($servers as $serverkey => $curServer) {
              if (!empty($curServer['realm']) && $server == $curServer['realm']) {
                // We found an entry, now set IMAP server values.
                foreach (array('server', 'folders', 'namespace',
(Continue reading)

Jan Schneider | 11 Jul 2012 00:33
Favicon
Gravatar

Re: multiple imap servers


Zitat von jason kawaja <kawaja <at> ece.ufl.edu>:

> greetings list, been running version 3 for a long while and i must  
> be missing something obvious as i was reading  
> http://wiki.horde.org/ImapSelect and have the following in my setup :
>
> horde/imp/config/conf.php
>
> <?php
> $conf['hooks']['preauthenticate'] = true;
> ...
>
> horde/imp/config/hooks.php
>
> <?php
>
> if (!function_exists('_horde_hook_preauthenticate')) {
>     function _horde_hook_preauthenticate($userID, $credential, $realm)
>     {
>         require dirname(__FILE__) . '/../imp/config/servers.php';
>
>         // Convert all to lower chars (even the possible domain part)
>         $userID=strtolower($userID);
>         // Strip domain part from user, if it exists.
>         if (($domainpart = strpos($userID, ' <at> '))) {
>           $server=substr($userID, $domainpart+1);
>           $userID=substr($userID, 0, $domainpart);
>           // Change the values only if a domain part was found ...
>           if (!empty($server)) {
(Continue reading)

Michael M Slusarz | 11 Jul 2012 00:37
Favicon
Gravatar

Re: multiple imap servers

Quoting Jan Schneider <jan <at> horde.org>:

> Zitat von jason kawaja <kawaja <at> ece.ufl.edu>:
>
>> greetings list, been running version 3 for a long while and i must  
>> be missing something obvious as i was reading  
>> http://wiki.horde.org/ImapSelect and have the following in my setup :
>>
>> horde/imp/config/conf.php
>>
>> <?php
>> $conf['hooks']['preauthenticate'] = true;
>> ...
>>
>> horde/imp/config/hooks.php
>>
>> <?php
>>
>> if (!function_exists('_horde_hook_preauthenticate')) {
>>    function _horde_hook_preauthenticate($userID, $credential, $realm)

[snip]

> And what exactly is the problem? Is the code not reached where  
> $_SESSION is overwritten, or does it not write the correct values?

And what version are you using?  None of this works with IMP 5 if that  
is what you have upgraded to.

michael
(Continue reading)

jason kawaja | 11 Jul 2012 14:05
Picon
Favicon

Re: multiple imap servers

On Jul 10, 2012, at 6:37 PM, Michael M Slusarz wrote:

> Quoting Jan Schneider <jan <at> horde.org>:
> 
>> Zitat von jason kawaja <kawaja <at> ece.ufl.edu>:
>> 
>>> greetings list, been running version 3 for a long while and i must be missing something obvious as i was
reading http://wiki.horde.org/ImapSelect and have the following in my setup :
>>> 
>>> horde/imp/config/conf.php
>>> 
>>> <?php
>>> $conf['hooks']['preauthenticate'] = true;
>>> ...
>>> 
>>> horde/imp/config/hooks.php
>>> 
>>> <?php
>>> 
>>> if (!function_exists('_horde_hook_preauthenticate')) {
>>>   function _horde_hook_preauthenticate($userID, $credential, $realm)
> 
> [snip]
> 
>> And what exactly is the problem? Is the code not reached where $_SESSION is overwritten, or does it not
write the correct values?
> 
> And what version are you using?  None of this works with IMP 5 if that is what you have upgraded to.

the problem is that imp/horde is not even attempting to choose another imap server other than the first i
(Continue reading)

Jan Schneider | 11 Jul 2012 14:44
Favicon
Gravatar

Re: multiple imap servers


Zitat von jason kawaja <kawaja <at> ece.ufl.edu>:

> On Jul 10, 2012, at 6:37 PM, Michael M Slusarz wrote:
>
>> Quoting Jan Schneider <jan <at> horde.org>:
>>
>>> Zitat von jason kawaja <kawaja <at> ece.ufl.edu>:
>>>
>>>> greetings list, been running version 3 for a long while and i  
>>>> must be missing something obvious as i was reading  
>>>> http://wiki.horde.org/ImapSelect and have the following in my  
>>>> setup :
>>>>
>>>> horde/imp/config/conf.php
>>>>
>>>> <?php
>>>> $conf['hooks']['preauthenticate'] = true;
>>>> ...
>>>>
>>>> horde/imp/config/hooks.php
>>>>
>>>> <?php
>>>>
>>>> if (!function_exists('_horde_hook_preauthenticate')) {
>>>>   function _horde_hook_preauthenticate($userID, $credential, $realm)
>>
>> [snip]
>>
>>> And what exactly is the problem? Is the code not reached where  
(Continue reading)


Gmane