summaryrefslogtreecommitdiff
path: root/bin/transfer_mailbox_folder.pl
diff options
context:
space:
mode:
Diffstat (limited to 'bin/transfer_mailbox_folder.pl')
-rwxr-xr-xbin/transfer_mailbox_folder.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/transfer_mailbox_folder.pl b/bin/transfer_mailbox_folder.pl
new file mode 100755
index 0000000..7871da7
--- /dev/null
+++ b/bin/transfer_mailbox_folder.pl
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+
+# John Doe's Archive folder is so large, it needs to be on a different server
+# with slower, cheaper storage. Or something like that.
+use Kolab;
+use Kolab::Cyrus;
+
+my ($mailboxName, $mailboxFolder, $mailboxPreferredServer) = @ARGV;
+
+if ( !$mailboxPreferredServer ) {
+ die("No target server specified");
+}
+
+Kolab::reloadConfig('/etc/kolab/kolab-shc.conf');
+
+Kolab::cyrusMurderTransferMailboxFolder($mailboxName, $mailboxFolder, $mailboxPrefferedServer);