How to rename a mailbox and resolve name clashes

[email protected] Thu, 23 Jul 2026 13:17:06 -0400
Newsgroups gmane.mail.imap.cyrus
Message-ID <[email protected]>
--17848270261.b5Bd0BC8.27230
Date: Thu, 23 Jul 2026 13:17:06 -0400
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hello,

As a result of some past experiments, I created two mailboxes with similar =
names, lets call them (1) "test-2020", and (2) "user/fabian/test-2020".=C2=
=A0 All emails intended for this mailbox landed in "test-2020". My intentio=
n was to actually collect all emails in "user/fabian/test-2020", however I =
ended up with _all_ emails in (1) and none in (2).=C2=A0

Now, I want to consolidate the two mailboxes under (2) name. Since (2) was =
actually empty, I connected through cyradm and=20
$ dm user/fabian/test-2020=20
to remove the empty mailbox and then I renamed (1) to (2):=20
$ rename test-2020 user/fabian/test-2020.=C2=A0=20

This seems to have succeeded !=C2=A0 however if I check the metadata I can =
still see references to the original test-2020 mailbox.

ctl_mboxlist -d
"DELETED.user.fabian.test-2020.6A5FF1CC": { ...=C2=A0"uniqueid": "132e85e15=
e9095f9", ...}
"test-2020": {... "uniqueid": "088b3d295f3cb7ac", ...}
"user.fabian.test-2020": {..., "uniqueid": "088b3d295f3cb7ac", ...}

The metadata (I assume extracted from mailboxes.db ?) now has two entries t=
hat point to the same mailbox directory and files. How can I get rid of the=
 "test-2020" entry ?=C2=A0=20

I thought of using cyr_dbtool to delete the keys I no longer want. However =
I don't know how to piece together and encode the key value so the tool can=
 actually find and remove it from the database.=C2=A0 Is this approach corr=
ect ?

If I were to start over, how should I replace (1) with (2) the proper way ?

Thank you,

------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/Tbd27983aaa2c52bb-M2cd441=
dba14559a95c03bee6
Delivery options: https://cyrus.topicbox.com/groups/info/subscription

--17848270261.b5Bd0BC8.27230
Date: Thu, 23 Jul 2026 13:17:06 -0400
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
<html><html><html><body><div>Hello,<br /></div><div><br /></div><div>As a r=
esult of some past experiments, I created two mailboxes with similar names,=
 lets call them (1) &quot;test-2020&quot;, and (2) &quot;user/fabian/test-2=
020&quot;.&nbsp; All emails intended for this mailbox landed in &quot;test-=
2020&quot;. My intention was to actually collect all emails in &quot;user/f=
abian/test-2020&quot;, however I ended up with _all_ emails in (1) and none=
 in (2).&nbsp;<br /></div><div><br /></div><div>Now, I want to consolidate =
the two mailboxes under (2) name. Since (2) was actually empty, I connected=
 through cyradm and <br /></div><div>$ dm user/fabian/test-2020 <br /></div=
><div>to remove the empty mailbox and then I renamed (1) to (2): <br /></di=
v><div>$ rename test-2020 user/fabian/test-2020.&nbsp; <br /></div><div><br=
 /></div><div>This seems to have succeeded !&nbsp; however if I check the m=
etadata I can still see references to the original test-2020 mailbox.<br />=
</div><div><br /></div><div>ctl_mboxlist -d<br /></div><div>&quot;DELETED.u=
ser.fabian.test-2020.6A5FF1CC&quot;: { ...&nbsp;&quot;uniqueid&quot;: &quot=
;132e85e15e9095f9&quot;, ...}</div><div>&quot;test-2020&quot;: {... &quot;u=
niqueid&quot;: &quot;088b3d295f3cb7ac&quot;, ...}<br /></div><div>&quot;use=
r.fabian.test-2020&quot;: {..., &quot;uniqueid&quot;: &quot;088b3d295f3cb7a=
c&quot;, ...}<br /></div><div><br /></div><div>The metadata (I assume extra=
cted from mailboxes.db ?) now has two entries that point to the same mailbo=
x directory and files. How can I get rid of the &quot;test-2020&quot; entry=
 ?&nbsp; <br /></div><div><br /></div><div>I thought of using cyr_dbtool to=
 delete the keys I no longer want. However I don&#39;t know how to piece to=
gether and encode the key value so the tool can actually find and remove it=
 from the database.&nbsp; Is this approach correct ?<br /></div><div><br />=
</div><div>If I were to start over, how should I replace (1) with (2) the p=
roper way ?</div><div><br /></div><div>Thank you,<br /></div><div><br /></d=
iv><div id=3D"topicbox-footer" style=3D"margin:10px 0 0;border-top:1px soli=
d #ddd;border-color:rgba(0,0,0,.15);padding:7px 0;">

<strong><a href=3D"https://cyrus.topicbox.com/latest" style=3D"color:inheri=
t;text-decoration:none">Cyrus</a></strong>
  / Info / see
<a href=3D"https://cyrus.topicbox.com/groups/info">discussions</a>
  +
<a href=3D"https://cyrus.topicbox.com/groups/info/members">participants</a>
  +
<a href=3D"https://cyrus.topicbox.com/groups/info/subscription">delivery&nb=
sp;options</a>
<a href=3D"https://cyrus.topicbox.com/groups/info/Tbd27983aaa2c52bb-M2cd441=
dba14559a95c03bee6" style=3D"float:right">Permalink</a>
</div>
</body></html></html></html>=

--17848270261.b5Bd0BC8.27230--