summaryrefslogtreecommitdiff
path: root/bin/delete_mailbox.pl
diff options
context:
space:
mode:
Diffstat (limited to 'bin/delete_mailbox.pl')
-rwxr-xr-xbin/delete_mailbox.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/delete_mailbox.pl b/bin/delete_mailbox.pl
new file mode 100755
index 0000000..c0992f6
--- /dev/null
+++ b/bin/delete_mailbox.pl
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+
+# Delete an existing mailbox.
+use Kolab;
+use Kolab::Cyrus;
+
+# John Doe's contract is terminated
+my ($mailboxName, $mailboxType) = @ARGV;
+
+if ( !$mailboxType ) {
+ $mailboxType = 'user';
+}
+
+Kolab::reloadConfig('/etc/kolab/kolab-shc.conf');
+
+Kolab::cyrusMurderDeleteMailbox($mailboxName, $mailboxType);