[imp] imap_config in IMP 5?

Michael M Slusarz slusarz at horde.org
Tue May 3 16:47:49 UTC 2011


Quoting Steven Premeau <premeau at uwp.edu>:

> Ultimately, I'm looking to override the namespace and filter the  
> folder list to just the items in mail/ (& INBOX).
>
> I've had trouble figuring out how namespace information from  
> imap_config was used in Horde 3.
>
> In general imap terms, I don't want to necessarily change the name  
> spaces, I want to change the default pattern provided to the LIST  
> and LSUB commands.
>
> IMAP commands like this:
>
> A101 LIST "" "mail/%"
> A102 LSUB "" "mail/%"
>
> End up giving me the listing of folders that I want, so it may be  
> that I just need the ability to influence those commands.
>
> If this is not currently possible in the code, point me in a  
> possible direction, I can work to see if I can correctly/safely make  
> it happen.

Yeah - this isn't possible through configuration since it is a very  
specific, non-standard, localized way to view the list of mailboxes on  
a server.

But it shouldn't be that hard to hack locally on your installation.   
Look at IMP_Imap_Tree::_getList() - remove this:

         foreach (array_keys($this->_namespaces) as $val) {
             $searches[] = $val . '*';
         }

and add the search patterns you want to $searches instead.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the imp mailing list