This commit is contained in:
temasky
2020-07-31 12:45:56 +00:00
commit 5d419635ed
306 changed files with 26949 additions and 0 deletions
+105
View File
@@ -0,0 +1,105 @@
# RFC2739 calEntry schema for OpenLDAP 2.x
# Version of RFC 2739 schema translated by Terrelle Shaw (xytek@xytek.org)
# Nov. 7, 2002
# Modifications by Peter Marschall <peter.marschall@adpm.de>
# Nov. 9, 2002
# 20060322 changes as in http://www.openldap.org/lists/openldap-software/200211/msg00242.html
# Notes:
# * RFC2739 seems to be a bit sloppy about attribute type and
# objectclass definitions syntax and also about attribute syntax
# and matching rules.
# (It even counts the attributes in the calEntry objectclass wrong ;-)
# * The following changes have been applied to correct the schema
# - added description to each attributetype definition
# - changed SYNTAX from 'String' to corresponding OID
# to make matching rules and syntax consistent
# - replaced illegal keyword SUBSTRING by SUBSTR
# - changed SUBSTR from caseIgnoreMatch to caseIgnoreSubstringsMatch
# - removed illegal keyword MULTI-VALUE
# - added keyword SINGLE-VALUE where appropriate
# - removed USAGE since cwuserApplications is the default
# - added description to the objectclass defintion
# - corrected typo in objectclass definition
# - added the attributetypes defined but not used to the objectclass
# 2.4.4.1 calCalURI
attributetype ( 1.2.840.113556.1.4.478
NAME 'calCalURI'
DESC 'URI to a snapshot of the users entire default calendar'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
# 2.4.4.2 calFBURL
attributetype ( 1.2.840.113556.1.4.479
NAME 'calFBURL'
DESC 'URI to the users default free/busy time data'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
# 2.4.4.3 calCAPURI
attributetype ( 1.2.840.113556.1.4.480
NAME 'calCAPURI'
DESC 'URI used to communicate with the users calendar'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
# 2.4.4.4 calCalAdrURI
attributetype ( 1.2.840.113556.1.4.481
NAME 'calCalAdrURI'
DESC 'URI to which event requests should be sent for the user'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
# 2.4.4.5 calOtherCalURIs
attributetype ( 1.2.840.113556.1.4.482
NAME 'calOtherCalURIs'
DESC 'URIs to snapshots of non-default calendars belonging to the user'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
# 2.4.4.6 calOtherFBURLs
attributetype ( 1.2.840.113556.1.4.483
NAME 'calOtherFBURLs'
DESC 'URIs to non-default free/busy data belonging to the user'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
# 2.4.4.7 calOtherCAPURIs
attributetype ( 1.2.840.113556.1.4.484
NAME 'calOtherCAPURIs'
DESC 'URIs to non-default calendars belonging to the user'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
# 2.4.4.8 calOtherCalAdrURIs
attributetype ( 1.2.840.113556.1.4.485
NAME 'calOtherCalAdrURIs'
DESC 'URIs of destinations for event requests to non-default calendars'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
# 2.4.3.1 calEntry
objectclass ( 1.2.840.113556.1.5.87
NAME 'calEntry'
DESC 'Calendering and free/busy information'
SUP top AUXILIARY
MAY ( calCalURI $ calFBURL $ calCAPURI $ calCalAdrURI $
calOtherCAPURIs $ calOtherCalURIs $ calOtherFBURLs $
calOtherCalAdrURIs ) )
# EOF
@@ -0,0 +1,184 @@
# $Id: calresource.schema,v 1.2 2011/04/29 10:54:03 martin$
#
# DRAFT only at the time of writing this schema!
# See: http://tools.ietf.org/html/draft-cal-resource-schema-03
#
###
#
# This specification defines a schema for representing resources to
# ease the discovery and scheduling of resources between any calendar
# client and server.
# LDAP and vCard mappings of the schema are described in this
# document. The Object model chosen is the lowest common denominator
# to adapt for LDAP.
#
# This schema depends on:
# - calentry.schema
#
# New LDAP objectclasses and attributes defined in this document need
# to be registered by the Internet Assigned Numbers Authority (IANA) as
# requested in the following template. Once the assignment is done,
# this document needs to be updated with the right OID numbers for all
# the newly defined objectclasses and attributes.
#
# Temporary we replace "x" in OIDs with unused "5"
# Example: 1.3.6.1.1.x.1.1 with 1.3.6.1.1.5.1.1
# Attribute Type Definitions
#
# ERROR in draft!
# Same OID for 2 attributetypes so I changed 'Kind'
# to ...0.0 instead of ...0.1
#
attributetype ( 1.3.6.1.1.5.0.0 NAME 'Kind'
DESC 'Kind of Object'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
attributetype ( 1.3.6.1.1.5.0.1
NAME 'VcardUid'
DESC 'VCard UniqueID'
EQUALITY caseExactMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
attributetype ( 1.3.6.1.1.5.0.2 NAME 'NickName'
DESC 'Nick Name'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.1.5.0.3 NAME 'Categories'
DESC 'Categories'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.1.5.0.4 NAME 'Restricted'
DESC 'Access Restricted'
EQUALITY booleanMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 )
attributetype ( 1.3.6.1.1.5.0.5 NAME 'AdmittanceURL'
DESC 'Cal Resource Admittance Info URL'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.1.5.0.6 NAME 'accessibilityURL'
DESC 'Cal Resource accessibility Info URL'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.1.5.0.7 NAME 'Capacity'
DESC 'Cal Resource Capacity'
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
attributetype ( 1.3.6.1.1.5.0.8 NAME 'InventoryList'
DESC 'Inventory List'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.1.5.0.9 NAME 'InventoryURL'
DESC 'Cal Resource Inventory Info URL'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.1.5.0.10 NAME 'ResourceManager'
DESC 'Cal Resource Manager Info'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.1.5.0.11 NAME 'TimeZoneID'
DESC 'Cal Time Zone ID'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.1.5.0.12 NAME 'Multiplebookings'
DESC 'Cal Num Bookings Allowed'
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
attributetype ( 1.3.6.1.1.5.0.13 NAME 'MaxInstances'
DESC 'Cal Maximum Instances allowed'
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
attributetype ( 1.3.6.1.1.5.0.14 NAME 'BookingWindowStart'
DESC 'Cal Booking Window Start'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.1.5.0.15 NAME 'BookingWindowEnd'
DESC 'Cal Booking Window End'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.1.5.0.16 NAME 'Autoschedule'
DESC 'Cal Scheduling no approval required'
EQUALITY booleanMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 )
attributetype ( 1.3.6.1.1.5.0.17 NAME 'ApprovalInfoURL'
DESC 'Cal Sched Approval Info'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.1.5.0.18 NAME 'SchedAdmin'
DESC 'Cal Sched Admin Info'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.1.5.0.19 NAME 'Nocost'
DESC 'Free or Priced resource'
EQUALITY booleanMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 )
attributetype ( 1.3.6.1.1.5.0.20 NAME 'CostURL'
DESC 'Cal Resource Cost Info'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
# Object Class Definitions
objectclass ( 1.3.6.1.1.5.1.1 NAME 'CalendarResource'
DESC 'Calendar Resource Object Class'
SUP calEntry
AUXILIARY
MUST (cn)
MAY ( kind $ nickname $ description $ ou $ categories $
member $ uniquemember $ accessibilityurl $ capacity $
owner $ resourcemanager $ timezoneid $
multiplebookings $ maxinstances $
bookingwindowstart $ bookingwindowend $ vcarduid ) )
objectclass ( 1.3.6.1.1.5.1.2 NAME 'AdmittanceInfo'
DESC 'Calendar Resource Admittance Info Class'
SUP CalendarResource
AUXILIARY
MAY ( admittanceurl ) )
objectclass ( 1.3.6.1.1.5.1.3 NAME 'InventoryInfo'
DESC 'Calendar Resource Inventory Info Class'
SUP CalendarResource
AUXILIARY
MAY ( inventorylist $ inventoryurl ) )
objectclass ( 1.3.6.1.1.5.1.4 NAME 'SchedApprovalInfo'
DESC 'Calendar Sched Approval Class'
SUP CalendarResource
AUXILIARY
MAY ( autoschedule $ approvalinfourl $ schedadmin ) )
objectclass ( 1.3.6.1.1.5.1.5 NAME 'CalendarResourceCost'
DESC 'Calendar Resource Cost Object Class'
SUP CalendarResource
AUXILIARY
MAY ( nocost $ costurl ) )
+3
View File
@@ -0,0 +1,3 @@
BASE PH_LDAP_SUFFIX
URI ldap://PH_LDAP_SERVER_HOST:PH_LDAP_SERVER_PORT
TLS_CACERT PH_SSL_CERT_FILE
+240
View File
@@ -0,0 +1,240 @@
# Schemas.
include PH_OPENLDAP_SCHEMA_DIR/core.schema
include PH_OPENLDAP_SCHEMA_DIR/corba.schema
include PH_OPENLDAP_SCHEMA_DIR/cosine.schema
include PH_OPENLDAP_SCHEMA_DIR/inetorgperson.schema
include PH_OPENLDAP_SCHEMA_DIR/nis.schema
# Include CalendarResource and calEntry object classes for resource management
# used in SOGo Groupware.
# FYI: https://docs.iredmail.org/sogo.manage.resources.html
#include PH_OPENLDAP_SCHEMA_DIR/calentry.schema
#include PH_OPENLDAP_SCHEMA_DIR/calresource.schema
# Amavisd-new schema.
include PH_OPENLDAP_SCHEMA_DIR/PH_AMAVISD_LDAP_SCHEMA_NAME
# iRedMail schema.
include PH_OPENLDAP_SCHEMA_DIR/iredmail.schema
# Where the pid file is put. The init.d script will not stop the
# server if you change this.
pidfile PH_OPENLDAP_PID_FILE
# List of arguments that were passed to the server
argsfile PH_OPENLDAP_ARGS_FILE
#modulepath PH_OPENLDAP_MODULE_PATH
#moduleload back_PH_OPENLDAP_DEFAULT_DBTYPE
#moduleload back_monitor
# Support password verification with SSHA512. Require OpenLDAP-2.4.32 or later.
#moduleload pw_sha2
# The syncprov overlay
#moduleload syncprov.la
# SSL cert files. if no need to access OpenLDAP from another host, it's ok to
# disable TLS/SSL support.
#TLSCACertificateFile PH_SSL_CERT_FILE
#TLSCertificateFile PH_SSL_CERT_FILE
#TLSCertificateKeyFile PH_SSL_KEY_FILE
# Disallow bind as anonymous.
disallow bind_anon
# Uncomment below line to allow binding as anonymous.
#allow bind_anon_cred
# Specify LDAP protocol version.
require LDAPv3
#allow bind_v2
# Log level.
# -1: enable all debugging
# 0: no debugging
# 128: access control list processing
# 256: stats log connections/operations/results
loglevel 0
# Access Control
# Allow users to change their own passwords and mail forwarding addresses.
access to attrs="userPassword,mailForwardingAddress,employeeNumber"
by anonymous auth
by self write
by dn.exact="PH_LDAP_BINDDN" read
by dn.exact="PH_LDAP_ADMIN_DN" write
by users none
# Allow to read others public info.
access to attrs="cn,sn,gn,givenName,telephoneNumber"
by anonymous auth
by self write
by dn.exact="PH_LDAP_BINDDN" read
by dn.exact="PH_LDAP_ADMIN_DN" write
by users read
# Domain attrs.
access to attrs="objectclass,domainName,mtaTransport,enabledService,domainSenderBccAddress,domainRecipientBccAddress,domainBackupMX,domainMaxQuotaSize,domainMaxUserNumber,domainPendingAliasName"
by anonymous auth
by self read
by dn.exact="PH_LDAP_BINDDN" read
by dn.exact="PH_LDAP_ADMIN_DN" write
by users read
access to attrs="domainAdmin,domainGlobalAdmin,domainSenderBccAddress,domainRecipientBccAddress"
by anonymous auth
by self read
by dn.exact="PH_LDAP_BINDDN" read
by dn.exact="PH_LDAP_ADMIN_DN" write
by users none
# User attrs.
access to attrs="mail,accountStatus,domainStatus,userSenderBccAddress,userRecipientBccAddress,mailQuota,backupMailAddress,shadowAddress,memberOfGroup,member,uniqueMember,storageBaseDirectory,homeDirectory,mailMessageStore,mailingListID"
by anonymous auth
by self read
by dn.exact="PH_LDAP_BINDDN" read
by dn.exact="PH_LDAP_ADMIN_DN" write
by users read
#
# Set ACL for vmail/vmailadmin.
#
access to dn="PH_LDAP_BINDDN"
by anonymous auth
by self write
by users none
access to dn="PH_LDAP_ADMIN_DN"
by anonymous auth
by self write
by users none
#
# Allow users to access their own domain subtree.
# Allow domain admin to modify accounts under same domain.
#
access to dn.regex="domainName=([^,]+),PH_LDAP_BASEDN$"
by anonymous auth
by self write
by dn.exact="PH_LDAP_BINDDN" read
by dn.exact="PH_LDAP_ADMIN_DN" write
by dn.regex="mail=[^,]+@$1,PH_LDAP_ADMIN_BASEDN$" write
by dn.regex="mail=[^,]+@$1,ou=Users,domainName=$1,PH_LDAP_BASEDN$" read
by users none
#
# Grant correct privileges to vmail/vmailadmin.
#
access to dn.subtree="PH_LDAP_BASEDN"
by anonymous auth
by self write
by dn.exact="PH_LDAP_BINDDN" read
by dn.exact="PH_LDAP_ADMIN_DN" write
by users read
access to dn.subtree="PH_LDAP_ADMIN_BASEDN"
by anonymous auth
by self write
by dn.exact="PH_LDAP_BINDDN" read
by dn.exact="PH_LDAP_ADMIN_DN" write
by users none
#
# Set permission for "cn=*,PH_LDAP_SUFFIX".
#
access to dn.regex="cn=[^,]+,PH_LDAP_SUFFIX"
by anonymous auth
by self write
by users none
#
# Set default permission.
#
access to *
by anonymous auth
by self write
by users read
#######################################################################
# Databases
#######################################################################
database monitor
access to dn="cn=monitor"
by dn.exact="PH_LDAP_ROOTDN" read
by dn.exact="PH_LDAP_BINDDN" read
by * none
# Database used to store mail accounts
database PH_OPENLDAP_DEFAULT_DBTYPE
suffix PH_LDAP_SUFFIX
directory PH_LDAP_DATA_DIR
rootdn PH_LDAP_ROOTDN
rootpw PH_LDAP_ROOTPW_SSHA
# Specify the maximum number of entries to return from a search operation.
# Defaults to 500. Use `unlimited` to specify no limits.
sizelimit unlimited
# Specify the maximum size of the database in bytes for mdb backend database.
# A memory map of this size is allocated at startup time and the database will
# not be allowed to grow beyond this size.
# The default is 10485760 bytes (10 MB).
# This setting may be changed upward if the configured limit needs to be increased.
#maxsize 2147483648
# Specify that on-disk database contents should not be
# immediately synchronized with in memory changes. Enabling
# this option may improve performance at the expense of data
# security. In particular, if the operating system crashes
# before changes are flushed, some number of transactions may be
# lost. By default, a full data flush/sync is performed when
# each transaction is committed.
#dbnosync
# Specify the frequency for flushing the database disk buffers.
# This directive specifies how often to checkpoint the BDB transaction log.
# This setting is only needed if the dbnosync option is used.
#
# The checkpoint will occur if either <kbyte> data has been
# written or <min> minutes have passed since the last
# checkpoint. Both arguments default to zero, in which case
# they are ignored. When the <min> argument is non-zero, an
# internal task will run every <min> minutes to perform the
# checkpoint.
# Note: currently the <kbyte> setting (for mdb backend) is unimplemented.
checkpoint 128 3
# Set directory permission.
mode 0700
#
# Default indexes.
#
index objectclass,entryCSN,entryUUID eq
index uidNumber,gidNumber,uid,memberUid,loginShell eq,pres
index homeDirectory,mailMessageStore eq,pres
index ou,cn,mail,surname,givenname,telephoneNumber,displayName eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
index shadowLastChange eq,pres
index member,uniqueMember eq,pres
#
# Index for mail attrs.
#
# Domain object
index domainName,mtaTransport,accountStatus,enabledService,disabledService eq,pres,sub
index domainAliasName eq,pres,sub
index domainMaxUserNumber eq,pres
index domainAdmin,domainGlobalAdmin,domainBackupMX eq,pres,sub
index domainSenderBccAddress,domainRecipientBccAddress eq,pres,sub
# Group object
index accessPolicy,hasMember,listAllowedUser,mailingListID eq,pres,sub
# User object
index mailForwardingAddress,shadowAddress eq,pres,sub
index backupMailAddress,memberOfGroup eq,pres,sub
index userRecipientBccAddress,userSenderBccAddress eq,pres,sub
index mobile,departmentNumber eq,pres,sub