unknown
5/18/25

[#6691] horde/kolab should also accept INBOX DOT(INBOX.) as IMAP folder name
Summary horde/kolab should also accept INBOX DOT(INBOX.) as IMAP folder name
Queue Kolab
Type Bug
State Resolved
Priority 2. Medium
Owners wrobel (at) horde (dot) org
Requester noethen (at) uni-paderborn (dot) de
Created 05/12/2008 (6215 days ago)
Due
Updated 03/23/2010 (5535 days ago)
Assigned 05/12/2008 (6215 days ago)
Resolved 03/23/2010 (5535 days ago)
Milestone
Patch No

History
03/23/2010 06:58:02 AM Gunnar Wrobel Comment #4
State ⇒ Resolved
Reply to this comment
Fixed in git.
05/28/2008 09:10:43 AM Thomas Jarosch Comment #2 Reply to this comment
Some server are using "INBOX." and not "INBOX/".
Thanks for the report. In fact this is freely configurable and "." or 
"/" are just the most common used delimiters. We should query the 
server upon connect which hierarchy separator is in use and save it in 
a variable. Though I guess this is more a low priority issue as the 
official Kolab servers uses "/" currently.


05/12/2008 05:11:04 PM Jan Schneider Assigned to Gunnar Wrobel
State ⇒ Assigned
 
05/12/2008 05:10:45 PM Jan Schneider Queue ⇒ Kolab
Version ⇒
 
05/12/2008 03:48:15 PM noethen (at) uni-paderborn (dot) de Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ horde/kolab should also accept INBOX DOT(INBOX.) as IMAP folder name
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment


In some functions like getOwner() in lib/Horde/Share/kolab.php

or lib/Horde/Kolab.php

or lib/Horde/Kolab/IMAP.php



the folder-name is checked against a regular Expression:



if (!preg_match(";(shared\.|INBOX[/]?|user/([^/]+)/)([^@]+)(@.*)?;", 
$folder_path, $matches)



Some server are using "INBOX." and not "INBOX/". Would be great, if 
that bug could be fixed.



function getOwner()

     {



         // PATCHED



         if 
((!preg_match(";(shared\.|INBOX[/]?|user/([^/]+)/)([^@]+)(@.*)?;", 
$this->get('folder'), $matches)) && 
(!preg_match(";(shared\.|INBOX[.]?|user\.([^.]+)\.)([^@]+)(@.*)?;", 
$this->get('folder'), $matches)) ) {

                 return PEAR::raiseError(sprintf(_("Owner of folder %s 
cannot be determined."), $this->get('folder')));

         }



         if ((substr($matches[1], 0, 6) == 'INBOX/')|| 
(substr($matches[1], 0, 6) == 'INBOX.')) {

             return Auth::getAuth();

         } elseif ((substr($matches[1], 0, 5) == 'user/') || 
(substr($matches[1], 0, 5) == 'user.')) {

             $domain = strstr(Auth::getAuth(), '@');

             $user_domain = isset($matches[4]) ? $matches[4] : $domain;

             return $matches[2] . $user_domain;

         } elseif ($matches[1] == 'shared.') {

             return 'anonymous';

         }

     }




Saved Queries