Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

cyrus-mailbox-postdelete.pl 773B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/perl
  2. # Cyrus Mailbox deletion
  3. #
  4. # Iñaki Rodriguez (irodriguez@virtualminds.es / irodriguez@ackstorm.es)
  5. #
  6. # LICENSE
  7. # This source file is subject to the GPL license that is bundled with
  8. # this package in the file LICENSE.TXT.
  9. #
  10. # (26/10/2009)
  11. use Cyrus::IMAP::Admin;
  12. require '/etc/mail/postfixadmin/cyrus.conf';
  13. use strict;
  14. use vars qw($cyrus_user $cyrus_password $cyrus_host);
  15. my %opts;
  16. my $mailbox = mailbox_name($ARGV[0]);
  17. my $client = Cyrus::IMAP::Admin->new($cyrus_host);
  18. die_on_error($client);
  19. $opts{-user} = $cyrus_user;
  20. $opts{-password} = $cyrus_password;
  21. $client->authenticate(%opts);
  22. die_on_error($client);
  23. $client->setacl($mailbox,$cyrus_user => 'all');
  24. die_on_error($client);
  25. $client->deletemailbox($mailbox);
  26. die_on_error($client);