Bulk deletion of mailbox ACLs under Cyrus 2.4.4
Bron Gondwana
brong at fastmail.fm
Sat Sep 3 01:16:32 EDT 2011
On Fri, Sep 02, 2011 at 05:57:38PM +0100, Mark Cave-Ayland wrote:
> > I've also tried using the "anyone"/"all" aliases instead of "*" but that
> > doesn't seem to work either - is anyone able to point me in the right
> > direction as to the correct syntax to completely remove all ACLs for all
> > users from a mailbox?
>
> Just for the archives: I managed to find an alternative solution to my
> problem. I ended up analysing the output of ctl_mboxlist -d and then
> writing a bit of perl to generate an output file with the same format
> for just the mailboxes I was interested in changing but with no ACLs. I
> then fed the resulting file into ctl_mboxlist -u and as if by magic the
> job was done :)
FYI - while that kinda works, it is slightly skanky, and leaves the
mailboxes.db and the "backup copy of the ACL" in the mailbox header
out of sync. It's also going to break in future when the content
of mailboxes.db changes. It's also somewhat incompatible with
replication, murder, etc.
The correct way[tm] is to iterate over all the mailboxes and do a
"setacl" for each one you want to change, probably using an external
script that talks IMAP.
Bron.
More information about the Info-cyrus
mailing list