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

# Create a new mailbox without a preference as to which server the mailbox is
# created on. To give the preferred mailbox server, set $mailboxPreferredServer
# to the server's Fully Qualified Domain Name.
use Kolab;
use Kolab::Cyrus;

my $mailboxName = $ARGV[0];
my $quota = $ARGV[1];
my $mailboxType = $ARGV[2];

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

if ( !$mailboxType ) {
    $mailboxType = 'user';
}

Kolab::cyrusMurderSetQuota($mailboxName, $quota, $mailboxType);