Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wonder if there is a way to list all mailboxes a user has access to via cyradm (or other means). One could run lam user.% and parse the output, but I think that sucks :)

share|improve this question
up vote 0 down vote accepted

Answering myself after poking around with IMAP::Admin


use IMAP::Admin;

$imap = IMAP::Admin->new('Server' => 'localhost',
                           'Login' => 'cyrus',
                           'Password' => 'cyrus',

my $finduser = "root"; # the user you search for

my @mailboxes = $imap->list("user.%");
foreach my $mailbox (@mailboxes) {
        my %list = $imap->get_acl($mailbox);
        if (defined($list{$finduser})) {
                print $mailbox."\n";
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.