attributetype ( 1.3.6.1.4.1.16331.2.2.1.1 NAME 'anniversary'
- DESC 'Holds Birthdays etc.'
+ DESC 'Holds Marriage dates etc.'
EQUALITY caseIgnoreMatch
ORDERING caseIgnoreOrderingMatch
SUBSTR caseIgnoreSubstringsMatch
SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.16331.2.2.1.2 NAME 'marker'
- DESC 'marking flag'
+ DESC 'For tagging support'
EQUALITY caseIgnoreMatch
ORDERING caseIgnoreOrderingMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256}
)
+attributetype ( 1.3.6.1.4.1.16331.2.2.1.3 NAME 'birthday'
+ DESC 'Date of birth'
+ EQUALITY caseIgnoreMatch
+ ORDERING caseIgnoreOrderingMatch
+ SUBSTR caseIgnoreSubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
+ SINGLE-VALUE )
+
+attributetype ( 1.3.6.1.4.1.16331.2.2.1.51 NAME 'custom1'
+ DESC 'Thunderbird compatible custom field 1'
+ EQUALITY caseIgnoreMatch
+ ORDERING caseIgnoreOrderingMatch
+ SUBSTR caseIgnoreSubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256}
+ )
+
+attributetype ( 1.3.6.1.4.1.16331.2.2.1.52 NAME 'custom2'
+ DESC 'Thunderbird compatible custom field 2'
+ EQUALITY caseIgnoreMatch
+ ORDERING caseIgnoreOrderingMatch
+ SUBSTR caseIgnoreSubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256}
+ )
+
+attributetype ( 1.3.6.1.4.1.16331.2.2.1.53 NAME 'custom3'
+ DESC 'Thunderbird compatible custom field 3'
+ EQUALITY caseIgnoreMatch
+ ORDERING caseIgnoreOrderingMatch
+ SUBSTR caseIgnoreSubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256}
+ )
+
+attributetype ( 1.3.6.1.4.1.16331.2.2.1.54 NAME 'custom4'
+ DESC 'Thunderbird compatible custom field 4'
+ EQUALITY caseIgnoreMatch
+ ORDERING caseIgnoreOrderingMatch
+ SUBSTR caseIgnoreSubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256}
+ )
+
+
+
+
objectclass ( 1.3.6.1.4.1.16331.2.2.2.1 NAME 'contactPerson'
DESC 'Contact - Addressbook entry'
AUXILIARY
- MAY ( anniversary $ marker )
+ MAY ( anniversary $ marker $ birthday $ custom1 $ custom2 $ custom3 $ custom4 )
)
+
+
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/inetorgperson.schema
-include /etc/ldap/schema/samba.schema
-include /etc/ldap/schema/courierimap.schema
-include /etc/ldap/schema/phpgwaccount.schema
-include /etc/ldap/schema/phpgwcontact.schema
-include /etc/ldap/schema/ldapab.schema
+include /etc/ldap/schema/ldapab.schema
# Schema check allows for forcing entries to
argsfile /var/run/slapd.args
# Where to store the replica logs
-replogfile /var/lib/ldap/replog
+replogfile /var/lib/ldap/replog
# Read slapd.conf(5) for possible values
#loglevel 256
-loglevel 0
+loglevel 0
#######################################################################
# ldbm database definitions
by * none
# private LDAP Addressbook is readable and writable for the owner only
-access to dn="(.*,)?ou=contacts,cn=([^,]+),ou=people,(.*)$"
+access to dn="(.*,)?ou=contacts,cn=([^,]+),ou=people,(.*)$"
by dn="cn=$2,ou=people,$3" write
by * none
# This entry has to be _before_ any other entry that matches the contact
# tree eg. the * entry
access to dn.subtree="ou=contacts,o=cosmocode,c=de"
- by users write
- by * read
+ by users write
+ by * read
# The admin dn has full write access
access to *
tpl_ldaperror("mod $key");
}
}
+
+ // special tag handling for Thunderbird
+ if($conf['tbtaghack'] && in_array('contactPerson',$OCLASSES)){
+ for($i=1;$i<5;$i++){
+ if(empty($entry["custom$i"])){
+ // deletion
+ unset($del);
+ $del["custom$i"]=array();
+ $r = @ldap_mod_replace($LDAP_CON,$dn,$del);
+ tpl_ldaperror("del custom$i");
+ }else{
+ // modification
+ unset($add);
+ $add["custom$i"]=$entry["custom$i"];
+ $r = @ldap_mod_replace($LDAP_CON,$dn,$add);
+ tpl_ldaperror("mod custom$i");
+ }
+ }
+ }
+
+
return $dn;
}
}
// Should the public address book be viewable by logged in users only? (0|1)
$conf['userlogreq'] = 0;
- // Should the additional schema ldapab.schema be used? (0|1)
- // Note: openxchange and extended are currently exclusive, do not use both at the same time!
- $conf['extended'] = 1;
-
- // Should we use some parts of the openxchange.schema? (0|1)
- // Note: openxchange and extended are currently exclusive, do not use both at the same time!
- $conf['openxchange'] = 0;
-
// Should we try to login using the username and password provided by httpd? (0|1)
$conf['httpd_auth'] = 0;
- // Dateformat for birthdays when using extended schema
+ // Store the first 4 tags in Thunderbird's custom fields when using ldapab.schema
+ $conf['tbtaghack'] = 1;
+
+ // Dateformat for birthdays and anniversary
// see http://www.php.net/manual/en/function.strftime.php
$conf['dateformat'] = '%Y/%m/%d';
#$conf['dateformat'] = '%d.%m.%Y';
}
}
+ // special tag handling for Thunderbird
+ if($conf['tbtaghack'] && in_array('contactPerson',$OCLASSES)){
+ if($in['marker'][0]) $out['custom1'][] = $in['marker'][0];
+ if($in['marker'][1]) $out['custom2'][] = $in['marker'][1];
+ if($in['marker'][2]) $out['custom3'][] = $in['marker'][2];
+ if($in['marker'][3]) $out['custom4'][] = $in['marker'][3];
+ }
+
+
// add the Objectclasses
$out['objectclass'] = $OCLASSES;