summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2008-10-10 14:25:34 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2008-10-10 14:25:34 (GMT)
commitbbd20e402d2f9fed819af868c908b8a950144696 (patch)
treed522feacf46f7217b4e6d6d0e2b1e0bb479729e4
parent16c9e2fdca8b33148a55c81b3c6d015582393f5e (diff)
downloadperl-Kolab-bbd20e402d2f9fed819af868c908b8a950144696.tar.gz
Use the correct configuration variables for the cache files. Added experimental kolabimapserver entry.
-rw-r--r--lib/Kolab/LDAP.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Kolab/LDAP.pm b/lib/Kolab/LDAP.pm
index dc20693..5d87b0b 100644
--- a/lib/Kolab/LDAP.pm
+++ b/lib/Kolab/LDAP.pm
@@ -29,6 +29,7 @@ use strict;
use warnings;
use UNIVERSAL;
use Time::Local;
+use Net::Domain qw(hostfqdn);
use Net::LDAP qw( LDAP_SUCCESS LDAP_PROTOCOL_ERROR LDAP_REFERRAL );
use Net::LDAPS;
use Net::LDAP::Util;
@@ -95,7 +96,7 @@ sub uidcacheOpen
Kolab::log('L', 'Opening mailbox uid cache DB');
my %uid_db;
- if (!dbmopen(%uid_db, "$db_statedir/mailbox-uidcache.db", 0666)) {
+ if (!dbmopen(%uid_db, $Kolab::config{'kolab_mailboxuiddb'}, 0666)) {
Kolab::log('L', 'Unable to open mailbox uid cache DB', KOLAB_ERROR);
exit(1);
}
@@ -151,13 +152,13 @@ sub graveyardOpen
Kolab::log('L', 'Opening graveyard uid/timestamp cache DB');
my %gyard_db;
- if (!dbmopen(%gyard_db, "$db_statedir/graveyard-uidcache.db", 0666)) {
+ if (!dbmopen(%gyard_db, $Kolab::config{'graveyard_uidcache'}, 0666)) {
Kolab::log('L', 'Unable to open graveyard uid cache DB', KOLAB_ERROR);
exit(1);
}
my %gyard_ts_db;
- if (!dbmopen(%gyard_ts_db, "$db_statedir/graveyard-tscache.db", 0666)) {
+ if (!dbmopen(%gyard_ts_db, $Kolab::config{'graveyard_tscache'}, 0666)) {
Kolab::log('L', 'Unable to open graveyard timestamp cache DB', KOLAB_ERROR);
exit(1);
}
@@ -451,6 +452,7 @@ sub createObject
return if( $objuidfield eq 'mail' && !$object->get_value('uid') );
my $kolabhomeserver = lc($object->get_value('kolabhomeserver'));
+ my $kolabimapserver = lc($object->get_value('kolabimapserver'));
my $islocal = 1;
my $del = $object->get_value($Kolab::config{$p . '_field_deleted'}, asref => 1);
if( ref($del) eq 'ARRAY' && @$del > 0 ) {
@@ -458,7 +460,8 @@ sub createObject
." because it is deleted", KOLAB_DEBUG);
return;
}
- if( $kolabhomeserver && $kolabhomeserver ne lc($Kolab::config{'fqdnhostname'}) ) {
+ if( ($kolabhomeserver && $kolabhomeserver ne lc($Kolab::config{'fqdnhostname'}))
+ || $kolabimapserver && $kolabimapserver ne lc(hostfqdn()) ) {
if( $p eq 'sf' ) {
# Dont create shared folders on other hosts than it's kolabhomeserver
Kolab::log('L', "Kolab::LDAP::createObject() skipping shared folder for other server $kolabhomeserver", KOLAB_DEBUG);