thomas: server/perl-kolab/sbin kolab_imappartitions.in, NONE, 1.1 .cvsignore, 1.1, 1.2
cvs at kolab.org
cvs at kolab.org
Mon Mar 16 18:17:37 CET 2009
Author: thomas
Update of /kolabrepository/server/perl-kolab/sbin
In directory doto:/tmp/cvs-serv5038/perl-kolab/sbin
Modified Files:
.cvsignore
Added Files:
kolab_imappartitions.in
Log Message:
Select random imap partition when creating new user mailboxes.
The behavior can be modified by setting a different imappartitions_script in
kolab.conf or disabled by setting imappartitions_script to an empty value.
--- NEW FILE: kolab_imappartitions.in ---
#!perl
=head1 NAME
kolab_imappartitions - List all imap partition
=head1 SYNOPSIS
B<kolab_imappartitions>
=head1 COPYRIGHT AND AUTHORS
Copyright (c) 2009 Intevation GmbH
Written by Thomas Arendsen Hein <thomas at intevation.de>
=head1 LICENSE
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You can view the GNU General Public License, online, at the GNU
Project's homepage; see
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>.
=cut
use strict;
use Kolab;
use IO::File;
Kolab::reloadConfig("@CONFIG_DIR@/kolab.globals");
my $imap_conf = "$Kolab::config{'imap_confdir'}/imapd.conf";
my $file;
if (!($file = IO::File->new($imap_conf, 'r'))) {
Kolab::log('T', "Unable to open IMAP configuration file `$imap_conf': $!", KOLAB_ERROR);
# Error, use default partition
print "\n";
exit(1);
}
while (<$file>) {
if (/^\s*partition-(\w+):/) {
print "$1\n";
}
}
$file->close;
exit(0);
Index: .cvsignore
===================================================================
RCS file: /kolabrepository/server/perl-kolab/sbin/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- .cvsignore 16 Mar 2009 15:01:17 -0000 1.1
+++ .cvsignore 16 Mar 2009 17:17:35 -0000 1.2
@@ -1,4 +1,5 @@
kolab_bootstrap
+kolab_imappartitions
kolabcheckperm
kolabconf
kolabd
More information about the commits
mailing list