<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Renaming public folder is wrong</title> 
  <pubDate>Fri, 10 Apr 2026 19:46:55 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8468</link> 
  <atom:link rel="self" type="application/rss+xml" title="Renaming public folder is wrong" href="https://bugs.horde.org/ticket/8468/rss" /> 
  <description>Renaming public folder is wrong</description> 
 
   
   
  <item> 
   <title>Hi,

we have a IMAP server (cyrus) with this namespace:

  N</title> 
   <description>Hi,

we have a IMAP server (cyrus) with this namespace:

  NAMESPACE ((&quot;INBOX.&quot; &quot;.&quot;)) ((&quot;user.&quot; &quot;.&quot;)) ((&quot;&quot; &quot;.&quot;))



We&#039;ve so-called group mailboxes, aka group.test.folder1

Renaming such a  folder within IMP&#039;s folder screen moves this folder below user&#039;s INBOX, i.e.

  rename group.test.folder1 to group.test.folder2

leads to INBOX.group.test.folder2, but not to group.test.folder2



IMAP command is

   Rename group.test.folder1 INBOX.group.test.folder2



Any help is appreciated.



Regards,

Frank



</description> 
   <pubDate>Fri, 31 Jul 2009 14:40:14 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55099</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/imp/lib/IMP.php?rt=horde&amp;r1=1.449.4.126&amp;r2=1.449.4.127&amp;ty=u</description> 
   <pubDate>Wed, 05 Aug 2009 03:56:39 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55191</link> 
  </item> 
   
  <item> 
   <title>Does this patch fix things?</title> 
   <description>Does this patch fix things?</description> 
   <pubDate>Wed, 05 Aug 2009 03:57:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55193</link> 
  </item> 
   
  <item> 
   <title>&gt; Does this patch fix things?



It fixes renaming the &quot;grou</title> 
   <description>&gt; Does this patch fix things?



It fixes renaming the &quot;group.*&quot; folders, but breaks renaming folders in INBOX.

Renaming test to test1 (in INBOX) leads to IMAP command 

Rename INBOX.test test1  -&gt;  Permission denied



Thanks,

Frank</description> 
   <pubDate>Wed, 05 Aug 2009 06:47:18 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55196</link> 
  </item> 
   
  <item> 
   <title>I knew I had seen this before - this is the same issue as Bu</title> 
   <description>I knew I had seen this before - this is the same issue as Bug #2874.</description> 
   <pubDate>Wed, 05 Aug 2009 07:03:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55197</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/imp/folders.php?rt=horde&amp;r1=2.309.2.43&amp;r2=2.309.2.44&amp;ty=u</description> 
   <pubDate>Wed, 05 Aug 2009 07:47:06 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55199</link> 
  </item> 
   
  <item> 
   <title>Take 2 - try this latest patch.  Essentially, it doesn&#039;t try</title> 
   <description>Take 2 - try this latest patch.  Essentially, it doesn&#039;t try to auto-magically add namespace information.</description> 
   <pubDate>Wed, 05 Aug 2009 07:48:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55200</link> 
  </item> 
   
  <item> 
   <title>&gt; Take 2 - try this latest patch.  Essentially, it doesn&#039;t t</title> 
   <description>&gt; Take 2 - try this latest patch.  Essentially, it doesn&#039;t try to 

&gt; auto-magically add namespace information.



The same behavior as with the previous patch: 

Renaming group.* (namespace &#039;&#039;) folder is ok, renaming in INBOX namespace is wrong.

I&#039;d like to rename &quot;test&quot; (in INBOX) to &quot;test1&quot;,

IMP aks for new name for &quot;test&quot; (not &quot;INBOX.test&quot;), I give &quot;test1&quot;

This leads to:  Rename INBOX.test test1  -&gt;  Permission denied



It&#039;s a bit tricky for IMP to detect which namespace a folder should go to (if an &quot;empty&quot; namespace &#039;&#039; exists). 

An approach might be (pseudo code):



if ($newfolder starts with &quot;non-empty namespace&quot;) {

    // INBOX.test1 - should be ok to use $newfolder

} else {

    if ($newfolder doesn&#039;t contain delimiter  - &#039;.&#039; im my server) {

        // test1

        $newfolder = defaultnamespace . $newfolder;

    } elseif ($newfolder &quot;starts with existing foldername&quot;) {

        // i.e. group.test.test1 -&gt;

        // group.test exists already -&gt; use $newfolder

        // if a user wants to create/rename to INBOX.group.test.test1 (a rare case IMHO)

        // he has to type INBOX.group.test.test1 

    } elseif () {

        // other.folder

        $newfolder defaultnamespace . $newfolder;

    }

}



Frank</description> 
   <pubDate>Wed, 05 Aug 2009 10:27:44 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55208</link> 
  </item> 
   
  <item> 
   <title>&gt; An approach might be (pseudo code):

&gt;

&gt; if ($newfolder s</title> 
   <description>&gt; An approach might be (pseudo code):

&gt;

&gt; if ($newfolder starts with &quot;non-empty namespace&quot;) {

&gt;     // INBOX.test1 - should be ok to use $newfolder

&gt; } else {

&gt;     if ($newfolder doesn&#039;t contain delimiter  - &#039;.&#039; im my server) {

&gt;         // test1

&gt;         $newfolder = defaultnamespace . $newfolder;

&gt;     } elseif ($newfolder &quot;starts with existing foldername&quot;) {

&gt;         // i.e. group.test.test1 -&gt;

&gt;         // group.test exists already -&gt; use $newfolder

&gt;         // if a user wants to create/rename to INBOX.group.test.test1 

&gt; (a rare case IMHO)

&gt;         // he has to type INBOX.group.test.test1

&gt;     } elseif () {

&gt;         // other.folder

&gt;         $newfolder defaultnamespace . $newfolder;

&gt;     }

&gt; }



What if the user wants to rename &#039;group.test.test1&#039; to &#039;foo.test2&#039;.  It would fall through to your last case and get added as &#039;INBOX.foo.test2&#039; which is not correct.



There are only two ways I can think of to fix:

1. Look at the old mailbox name and only allow a rename within that namespace.

2. Requiring the entire folder name while renaming, but this was what was specifically refused in the previously mentioned ticket since personal namespaces should be invisible to the user.



This is why Cyrus&#039; namespace setup has *never* made sense to me.  The default namespace should be a user&#039;s personal namespace - shared and other folders are special folders that should live under a specific sub-folder.</description> 
   <pubDate>Wed, 05 Aug 2009 21:18:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55229</link> 
  </item> 
   
  <item> 
   <title>Re-reading RFC 2342, the assumption seems to be that folders</title> 
   <description>Re-reading RFC 2342, the assumption seems to be that folders (once created) are restricted to that particular namespace.  So we will go with option #1.</description> 
   <pubDate>Wed, 05 Aug 2009 21:29:54 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55230</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; An approach might be (pseudo code):

&gt;&gt;

&gt;&gt; if ($newfolde</title> 
   <description>&gt;&gt; An approach might be (pseudo code):

&gt;&gt;

&gt;&gt; if ($newfolder starts with &quot;non-empty namespace&quot;) {

&gt;&gt;     // INBOX.test1 - should be ok to use $newfolder

&gt;&gt; } else {

&gt;&gt;     if ($newfolder doesn&#039;t contain delimiter  - &#039;.&#039; im my server) {

&gt;&gt;         // test1

&gt;&gt;         $newfolder = defaultnamespace . $newfolder;

&gt;&gt;     } elseif ($newfolder &quot;starts with existing foldername&quot;) {

&gt;&gt;         // i.e. group.test.test1 -&gt;

&gt;&gt;         // group.test exists already -&gt; use $newfolder

&gt;&gt;         // if a user wants to create/rename to INBOX.group.test.test1

&gt;&gt; (a rare case IMHO)

&gt;&gt;         // he has to type INBOX.group.test.test1

&gt;&gt;     } elseif () {

&gt;&gt;         // other.folder

&gt;&gt;         $newfolder defaultnamespace . $newfolder;

&gt;&gt;     }

&gt;&gt; }

&gt;

&gt; What if the user wants to rename &#039;group.test.test1&#039; to &#039;foo.test2&#039;.  

&gt; It would fall through to your last case and get added as 

&gt; &#039;INBOX.foo.test2&#039; which is not correct.



This is correct IMHO  - at least in our environment no user may create toplevel folders 

in public namespace, so INBOX.foo.test2 is the only solution.



&gt; There are only two ways I can think of to fix:

&gt; 1. Look at the old mailbox name and only allow a rename within that 

&gt; namespace.



Would be better than now, but not optimal.



&gt; 2. Requiring the entire folder name while renaming, but this was what 

&gt; was specifically refused in the previously mentioned ticket since 

&gt; personal namespaces should be invisible to the user.



That&#039;s right, don&#039;t do that.



&gt; This is why Cyrus&#039; namespace setup has *never* made sense to me.  The 

&gt; default namespace should be a user&#039;s personal namespace - shared and 

&gt; other folders are special folders that should live under a specific 

&gt; sub-folder.



I agree ... 

In a GUI this moving of folders between namespaces is easier ...



Frank

</description> 
   <pubDate>Wed, 05 Aug 2009 21:30:33 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55231</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/imp/folders.php?rt=horde&amp;r1=2.309.2.44&amp;r2=2.309.2.45&amp;ty=u</description> 
   <pubDate>Wed, 05 Aug 2009 21:58:00 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55232</link> 
  </item> 
   
  <item> 
   <title>&gt; http://cvs.horde.org/diff.php/imp/folders.php?rt=horde&amp;r1=</title> 
   <description>&gt; http://cvs.horde.org/diff.php/imp/folders.php?rt=horde&amp;r1=2.309.2.44&amp;r2=2.309.2.45&amp;ty=u



Try this patch.</description> 
   <pubDate>Wed, 05 Aug 2009 21:59:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55233</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; http://cvs.horde.org/diff.php/imp/folders.php?rt=horde&amp;r1</title> 
   <description>&gt;&gt; http://cvs.horde.org/diff.php/imp/folders.php?rt=horde&amp;r1=2.309.2.44&amp;r2=2.309.2.45&amp;ty=u

&gt;

&gt; Try this patch.



I have to change

  $old_names = array_map(&#039;trim&#039;, explode(&quot;\n&quot;, Horde_Util::getFormData(&#039;old_names&#039;)));

  $new_names = array_map(&#039;trim&#039;, explode(&quot;\n&quot;, Horde_Util::getFormData(&#039;new_names&#039;)));

to:

  $old_names = array_map(&#039;trim&#039;, explode(&quot;\n&quot;, Util::getFormData(&#039;old_names&#039;)));

  $new_names = array_map(&#039;trim&#039;, explode(&quot;\n&quot;, Util::getFormData(&#039;new_names&#039;)));



(otherwise it exits - empty page in browser).



With this, yes, it works:

 - renaming folder in INBOX namespace

 - renaming folder within shared namespace

 - renaming a shared folder to INBOX: Give INBOX.foldername as new folder name, that&#039;s ok.



Thank you very much,

Frank</description> 
   <pubDate>Thu, 06 Aug 2009 06:33:06 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55238</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/imp/docs/CHANGES?rt=horde&amp;r1=1.699.2.399&amp;r2=1.699.2.400&amp;ty=u
http://cvs.horde.org/diff.php/imp/folders.php?rt=horde&amp;r1=2.309.2.45&amp;r2=2.309.2.46&amp;ty=u</description> 
   <pubDate>Thu, 06 Aug 2009 17:12:45 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55242</link> 
  </item> 
   
  <item> 
   <title>&gt; I have to change

&gt;   $old_names = array_map(&#039;trim&#039;, explo</title> 
   <description>&gt; I have to change

&gt;   $old_names = array_map(&#039;trim&#039;, explode(&quot;\n&quot;, 

&gt; Horde_Util::getFormData(&#039;old_names&#039;)));

&gt;   $new_names = array_map(&#039;trim&#039;, explode(&quot;\n&quot;, 

&gt; Horde_Util::getFormData(&#039;new_names&#039;)));

&gt; to:

&gt;   $old_names = array_map(&#039;trim&#039;, explode(&quot;\n&quot;, 

&gt; Util::getFormData(&#039;old_names&#039;)));

&gt;   $new_names = array_map(&#039;trim&#039;, explode(&quot;\n&quot;, 

&gt; Util::getFormData(&#039;new_names&#039;)));



Thanks for the catch - my system is set up so that both are available so I didn&#039;t notice this.  And thanks for helping to resolve this issue.</description> 
   <pubDate>Thu, 06 Aug 2009 17:14:03 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t55243</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #8468: W</title> 
   <description>Changes have been made in Git for this ticket:

Bug #8468: When appending namespaces, search for empty namespace.

http://git.horde.org/diff.php/imp/lib/Imap.php?rt=horde-git&amp;r1=df8c626194789a61214771c8b5ac07fa870bdc8b&amp;r2=ba5fce1be74c5d90f085e622b806eae53d4acc38</description> 
   <pubDate>Wed, 13 Jan 2010 00:09:59 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t57591</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #8468: D</title> 
   <description>Changes have been made in Git for this ticket:

Bug #8468: Doing too much magic on rename folder name - we have to trust the user at some point.

http://git.horde.org/diff.php/imp/folders.php?rt=horde-git&amp;r1=df8c626194789a61214771c8b5ac07fa870bdc8b&amp;r2=8b659fe604f4a3a6af9ea1509029198bdaafa4e3</description> 
   <pubDate>Wed, 13 Jan 2010 00:10:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t57592</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #8468: A</title> 
   <description>Changes have been made in Git for this ticket:

Bug #8468: Another stab at renaming fix

http://git.horde.org/diff.php/imp/folders.php?rt=horde-git&amp;r1=8b659fe604f4a3a6af9ea1509029198bdaafa4e3&amp;r2=5b9484944bd31302510bc2223a8ba6f1f5b826bd
http://git.horde.org/diff.php/imp/lib/IMP.php?rt=horde-git&amp;r1=25e9e426a4d2e25f90ca3685559df73aaaab02f0&amp;r2=5b9484944bd31302510bc2223a8ba6f1f5b826bd</description> 
   <pubDate>Wed, 13 Jan 2010 00:10:05 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t57594</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #8468: c</title> 
   <description>Changes have been made in Git for this ticket:

Bug #8468: changelog

http://git.horde.org/diff.php/imp/docs/CHANGES?rt=horde-git&amp;r1=e17b03b8b829d220cfd08745c4601c9ad9f8c4a8&amp;r2=890e3714e4e703d757718d0c08c9efaa082c7122</description> 
   <pubDate>Wed, 13 Jan 2010 00:10:07 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8468#t57595</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
