#
# Schema 1 and Schema 2 compatibility mode Ldap entries for the last DN entry
#   in the Domain Component (DC) tree.
#
# This ldif file is invoked during the second phase of the installer
# i.e. by the devsetup program for developer install, or by the configure
#      program for the full habanero installer
#
# For every ldap entry I want to create in the directory (i.e. the
#  DN and its attribute/values). I need several ldif entries:
#  1. one ldif entry for adding the DN in case it does not exist
#  2. one ldif entry for each attribute/value pair regardless of whether
#     it is a "add" or "replace" operation. 
#  3. one ldif entry to do a "delete" if you want the existing attribute
#     to be deleted first, and there are multiple values to add for that
#     attribute. I.e. to "replace" the existing attribute with
#     new values.
#  Instead of a "delete" and "add", you could do "replace" if there is
#  only a single value for the attribute.
#
#  Aside:
#     I realize that I can combine the replace operation for an attribute
#     into a single ldif entry since, replace will not fail if the attribute
#     does not exist. But it is just more flexible to handle each 
#     attribute/value pair individually in case, there are different
#     behaviors for upgrade/uninstall, or if you want to change it to add
#     later. 
#      
# NOTE
# - so be very careful when editing an ldif entry. Be aware that there 
#   may be an attribute of the same name at the same DN. 
#
# This file originally tried to delete all the DNs, but that is a fruitless
# exercise since there is no way to delete a DN and all its leaves.
#
# attributes that have multiple values (i.e. use multiple add ldif entries,
#  instead of a single replace ldif entry)
# - aci
# - nsSSL3Ciphers
#
#--------------------------------------------------
# last dc tree ldif file to apply. This is the leaf entry in the dctree
# that corresponds to the actual email default domain being created.
#--------------------------------------------------
########################################
# dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
# Originally from iMS 5.2: Upgrading Default Domain
# Originally from iMS 5.2: msg.ugldap.dctree.lastdc.inf
# QQQ this currently assumes the the path to this dn exists. Need to 
#     generate this dynamically
########################################

# creates dn if it does not exist
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: add
objectClass: top
objectClass: domain

# objectClass domain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
add: objectclass
objectClass: domain

# objectClass inetDomain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
add: objectclass
objectClass: inetDomain

# objectClass mailDomain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
add: objectclass
objectClass: mailDomain

# objectclass nsManagedDomain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
add: objectclass
objectclass: nsManagedDomain

#     attribute of objectClass domain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
replace: description
description: DC node for <local.defdomain> hosted domain

#     attribute of objectClass inetDomain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
replace: inetDomainBaseDN
inetDomainBaseDN: <deforgdn>

#     attribute of objectClass inetDomain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
replace: inetDomainStatus
inetDomainStatus: active

#     attribute of objectClass mailDomain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
replace: mailDomainStatus
mailDomainStatus: active

#     attribute of objectClass mailDomain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
replace: preferredMailHost
preferredMailHost: <msg.ServerHostName>

#     attribute of objectClass mailDomain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
replace: mailDomainDiskQuota
mailDomainDiskQuota: -1

#     attribute of objectClass mailDomain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
replace: mailDomainMsgQuota
mailDomainMsgQuota: -1

#     attribute of objectClass mailDomain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
replace: mailDomainReportAddress
mailDomainReportAddress: postmaster@<local.defdomain>

#     attribute of objectclass nsManagedDomain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
replace: nsmaxdomains
nsmaxdomains: 1

#     attribute of objectclass nsManagedDomain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
replace: nsnumusers
nsnumusers: 1

#     attribute of objectclass nsManagedDomain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
replace: nsnumdomains
nsnumdomains: 1

#     attribute of objectclass nsManagedDomain
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
replace: nsnummaillists
nsnummaillists: 0

#     attribute of objectclass top
dn: <msg.dctree.Path>,<msg.dctree.Suffix.1>
changetype: modify
add: aci
aci: (targetattr="icsTimeZone||icsMandatorySubscribed||icsMandatoryView||icsDefaultAccess||icsRecurrenceBound||icsRecurrenceDate||icsAnonymousLogin||icsAnonymousAllowWrite||icsAnonymousCalendar||icsAnonymousSet||icsAnonymousDefaultSet||icsSessionTimeout||icsAllowRights||icsExtended||icsExtendedDomainPrefs")
 (targetfilter=(objectClass=icsCalendarDomain))
 (version 3.0; acl "Domain Adm calendar access - product=ims5.0,class=nda,num=16,version=1"; allow (all) groupdn="ldap:///cn=Domain Administrators,ou=Groups,<deforgdn>";)

