Three questions about Cyrus::IMAP::Admin:
I am using Cyrus::IMAP::Admin for a script to archive mailboxes. It should rename <mailbox> to <mailbox>.Archives.<date><integer>.
1). How does one list mailboxes which _don't_ contain ".Archives."? It's one thing to list those that _do_:
---- my @mailboxes = $connection->list "*.Archives.*"; ----
But I've been over the IMAP RFC and Cyrus documentation and can't find how to put negation in a pattern.
2). How does one test whether a mailbox exists? I want to do something like:
---- my $integer = 0; while (exists "$mailbox.Archives.$date$integer") { $integer++; } ---
3). How does one test whether a mailbox is empty? I want to do something like:
---- if (! empty $mailbox) { $connection->rename $mailbox "$mailbox.Archives.$date$integer"; } ----
As an extension, how does one test the size of a mailbox? Instead of "if (! empty $mailbox) ...", it might be useful to test "if (size $mailbox > $limit) ..."
Thank you very much for any help or suggestions!
Jack
--- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html