Re: Question regarding "specialuse_protect"

"Bron Gondwana via Info" <[email protected]> Thu, 18 Jun 2026 10:04:57 -0400
Newsgroups gmane.mail.imap.cyrus
Message-ID <[email protected]>
--041a970df6628cd22006a49b995e24765512023c
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

If you list that mailbox with RETURN SPECIAL-USE does it show up with the \=
Archive use?

What user are you creating the private annotation as?  I don't normally use=
 cyradm; but it says this in the docs:

Note, too, that "private" annotations are private to the user currently
authenticated as, not necessarily the owner of the mailbox.  To set
annotations for another user you must authorize as that user.

So you need to create that annotation as the owner of the mailbox in order =
for the special-use protection to apply.  The checks in mboxlist.c explicit=
ly use the owner of the mailbox as the lookup key:

    annotatemore_lookup(mbname_intname(mbname), "/specialuse", mbname_useri=
d(mbname), &attrib);

Regards,

Bron.

On Thu, Jun 18, 2026, at 03:34, [email protected] wrote:
> Dear list,
>=20
> I have a question regarding the proper usage of "specialuse_protect"
>=20
>=20
> In /etc/imapd.conf I have set the following:
>=20
>=20
> `specialuse_protect: \Archive \Drafts \Important \Junk \Sent \Trash`
>=20
> ... and restarted cyrus-imapd
>=20
> Then I created an "Archive" mailbox under my user account and set the met=
adata (the \Archive flag)
>=20
> cm user/johndoe/Archive
> setmetadata --private user/johndoe/Archive specialuse "\\Archive"
>=20
> I am using cyrus 3.6.1-4 in Debian Bookworm.
>=20
> As per my understanding of the docs, this option would prevent users from=
 deleting mailboxes with the respective flag(s) set, however I am still abl=
e to delete the "Archive" mailbox.
>=20
> Am I missing something crucial here?
>=20
> Thanks and best regards,
>=20
> Alex
> *Cyrus <https://cyrus.topicbox.com/latest>* / Info / see discussions <htt=
ps://cyrus.topicbox.com/groups/info> + participants <https://cyrus.topicbox=
.com/groups/info/members> + delivery options <https://cyrus.topicbox.com/gr=
oups/info/subscription> Permalink <https://cyrus.topicbox.com/groups/info/T=
360c1e69bcf26a3f-Ma7ffc788b79b612dd3691ec1>

--
  Bron Gondwana, CEO, Fastmail Pty Ltd / Fastmail US LLC
  [email protected]


------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/T360c1e69bcf26a3f-Ma926b8=
ab53347630ecdc5db5
Delivery options: https://cyrus.topicbox.com/groups/info/subscription

--041a970df6628cd22006a49b995e24765512023c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
<html><html><html><head><title></title></head><body><div style=3D"font-fami=
ly:Arial;">If you list that mailbox with RETURN SPECIAL-USE does it show up=
 with the \Archive use?</div><div style=3D"font-family:Arial;"><br /></div>=
<div style=3D"font-family:Arial;">What user are you creating the private an=
notation as?&nbsp; I don&#39;t normally use cyradm; but it says this in the=
 docs:</div><div style=3D"font-family:Arial;"><br /></div><pre style=3D"bor=
der-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-lef=
t-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-s=
tyle:solid;border-left-style:solid;border-top-color:rgb(204, 204, 204);bord=
er-right-color:rgb(204, 204, 204);border-bottom-color:rgb(204, 204, 204);bo=
rder-left-color:rgb(204, 204, 204);border-image-source:initial;border-image=
-slice:initial;border-image-width:initial;border-image-outset:initial;borde=
r-image-repeat:initial;border-top-left-radius:3px;border-top-right-radius:3=
px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-=
image:initial;background-position-x:initial;background-position-y:initial;b=
ackground-size:initial;background-repeat:initial;background-attachment:init=
ial;background-origin:initial;background-clip:initial;background-color:rgb(=
246, 246, 246);font-family:menlo, consolas, monospace;font-size:90%;margin-=
top:7px;margin-right:0px;margin-bottom:7px;margin-left:0px;padding-top:7px;=
padding-right:10px;padding-bottom:7px;padding-left:10px;white-space-collaps=
e:preserve;text-wrap-mode:wrap;overflow-wrap:break-word;">Note, too, that &=
quot;private&quot; annotations are private to the user currently
authenticated as, not necessarily the owner of the mailbox.  To set
annotations for another user you must authorize as that user.<br /></pre><d=
iv style=3D"font-family:Arial;"><br /></div><div style=3D"font-family:Arial=
;">So you need to create that annotation as the owner of the mailbox in ord=
er for the special-use protection to apply.&nbsp; The checks in mboxlist.c =
explicitly use the owner of the mailbox as the lookup key:</div><div style=
=3D"font-family:Arial;"><br /></div><pre style=3D"border-top-width:1px;bord=
er-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top=
-style:solid;border-right-style:solid;border-bottom-style:solid;border-left=
-style:solid;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204=
, 204, 204);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(20=
4, 204, 204);border-image-source:initial;border-image-slice:initial;border-=
image-width:initial;border-image-outset:initial;border-image-repeat:initial=
;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right=
-radius:3px;border-bottom-left-radius:3px;background-image:initial;backgrou=
nd-position-x:initial;background-position-y:initial;background-size:initial=
;background-repeat:initial;background-attachment:initial;background-origin:=
initial;background-clip:initial;background-color:rgb(246, 246, 246);font-fa=
mily:menlo, consolas, monospace;font-size:90%;margin-top:7px;margin-right:0=
px;margin-bottom:7px;margin-left:0px;padding-top:7px;padding-right:10px;pad=
ding-bottom:7px;padding-left:10px;white-space-collapse:preserve;text-wrap-m=
ode:wrap;overflow-wrap:break-word;">    annotatemore_lookup(mbname_intname(=
mbname), &quot;/specialuse&quot;, mbname_userid(mbname), &amp;attrib);<br /=
></pre><div style=3D"font-family:Arial;"><br /></div><div style=3D"font-fam=
ily:Arial;">Regards,</div><div style=3D"font-family:Arial;"><br /></div><di=
v style=3D"font-family:Arial;">Bron.</div><div style=3D"font-family:Arial;"=
><br /></div><div>On Thu, Jun 18, 2026, at 03:34,&nbsp;<a href=3D"mailto:al=
[email protected]">[email protected]</a> wrote:</div><blockquote id=3D"=
qt" style=3D"" type=3D"cite"><div>Dear list,</div><div><br /></div><div>I h=
ave a question regarding the proper usage of &quot;specialuse_protect&quot;=
</div><div><br /></div><div><br /></div><div>In /etc/imapd.conf I have set =
the following:</div><div><br /></div><div><br /></div><div><code style=3D"b=
order-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-r=
adius:3px;border-bottom-left-radius:3px;border-top-width:1px;border-right-w=
idth:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:sol=
id;border-right-style:solid;border-bottom-style:solid;border-left-style:sol=
id;border-top-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204=
);border-bottom-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 20=
4);border-image-source:initial;border-image-slice:initial;border-image-widt=
h:initial;border-image-outset:initial;border-image-repeat:initial;padding-t=
op:1px;padding-right:3px;padding-bottom:1px;padding-left:3px;background-ima=
ge:initial;background-position-x:initial;background-position-y:initial;back=
ground-size:initial;background-repeat:initial;background-attachment:initial=
;background-origin:initial;background-clip:initial;background-color:rgb(246=
, 246, 246);font-family:menlo, consolas, monospace;font-size:90%;">specialu=
se_protect: \Archive \Drafts \Important \Junk \Sent \Trash</code></div><div=
><br /></div><div>... and restarted cyrus-imapd</div><div><br /></div><div>=
Then I created an &quot;Archive&quot; mailbox under my user account and set=
 the metadata (the \Archive flag)</div><div><br /></div><pre style=3D"margi=
n-top:7px;margin-right:0px;margin-bottom:7px;margin-left:0px;border-top-lef=
t-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;bor=
der-bottom-left-radius:3px;border-top-width:1px;border-right-width:1px;bord=
er-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-rig=
ht-style:solid;border-bottom-style:solid;border-left-style:solid;border-top=
-color:rgb(204, 204, 204);border-right-color:rgb(204, 204, 204);border-bott=
om-color:rgb(204, 204, 204);border-left-color:rgb(204, 204, 204);border-ima=
ge-source:initial;border-image-slice:initial;border-image-width:initial;bor=
der-image-outset:initial;border-image-repeat:initial;padding-top:7px;paddin=
g-right:10px;padding-bottom:7px;padding-left:10px;background-image:initial;=
background-position-x:initial;background-position-y:initial;background-size=
:initial;background-repeat:initial;background-attachment:initial;background=
-origin:initial;background-clip:initial;background-color:rgb(246, 246, 246)=
;font-family:menlo, consolas, monospace;font-size:90%;white-space-collapse:=
preserve;text-wrap-mode:wrap;overflow-wrap:break-word;">cm user/johndoe/Arc=
hive
setmetadata --private user/johndoe/Archive specialuse &quot;\\Archive&quot;=
</pre><div><br /></div><div>I am using cyrus 3.6.1-4 in Debian Bookworm.</d=
iv><div><br /></div><div>As per my understanding of the docs, this option w=
ould prevent users from deleting mailboxes with the respective flag(s) set,=
 however I am still able to delete the &quot;Archive&quot; mailbox.</div><d=
iv><br /></div><div>Am I missing something crucial here?</div><div><br /></=
div><div>Thanks and best regards,</div><div><br /></div><div>Alex</div></bl=
ockquote><div style=3D"font-family:Arial;"><br /></div><div id=3D"sig566294=
17"><div class=3D"signature">--</div><div class=3D"signature">&nbsp; Bron G=
ondwana, CEO, Fastmail Pty Ltd / Fastmail US LLC</div><div class=3D"signatu=
re">&nbsp; [email protected]</div><div class=3D"signature"><br /></div=
></div><div style=3D"font-family:Arial;"><br /></div><div id=3D"topicbox-fo=
oter" style=3D"margin:10px 0 0;border-top:1px solid #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/T360c1e69bcf26a3f-Ma926b8=
ab53347630ecdc5db5" style=3D"float:right">Permalink</a>
</div>
</body></html></html></html>=

--041a970df6628cd22006a49b995e24765512023c--