gunnar: server/perl-kolab/lib/Kolab LDAP.pm,1.6,1.7

cvs at kolab.org cvs at kolab.org
Fri Oct 10 16:25:36 CEST 2008


Author: gunnar

Update of /kolabrepository/server/perl-kolab/lib/Kolab
In directory doto:/tmp/cvs-serv20655/Kolab

Modified Files:
	LDAP.pm 
Log Message:
Use the correct configuration variables for the cache files. Added experimental kolabimapserver entry.

Index: LDAP.pm
===================================================================
RCS file: /kolabrepository/server/perl-kolab/lib/Kolab/LDAP.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- LDAP.pm	9 Jul 2008 14:00:15 -0000	1.6
+++ LDAP.pm	10 Oct 2008 14:25:34 -0000	1.7
@@ -29,6 +29,7 @@
 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 @@
     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 @@
     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 @@
     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 @@
 		 ." 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);





More information about the commits mailing list