summaryrefslogtreecommitdiff
path: root/bin/transfer_mailbox_folder.pl
blob: 7871da74f6d0ef911ea6e158efbeae61f2f6c8b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);