summaryrefslogtreecommitdiff
path: root/bin/transfer_mailbox.pl
blob: 0c3aedb36beb138e8ff8c2d1e478d33584a35559 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl

# Transfer a mailbox from one server to another.
use Kolab;
use Kolab::Cyrus;

my $mailboxName = $ARGV[0];
my $mailboxPreferredServer = $ARGV[1];

if ( !$mailboxPreferredServer ) {
    die("No target server specified");
}

Kolab::reloadConfig('/etc/kolab/kolab-shc.conf');

my $rc = Kolab::cyrusMurderTransferMailbox($mailboxName, $mailboxPreferredServer);

exit !$rc;