# Copyright 2004-2017 Univention GmbH
#
# http://www.univention.de/
#
# All rights reserved.
#
# The source code of this program is made available
# under the terms of the GNU Affero General Public License version 3
# (GNU AGPL V3) as published by the Free Software Foundation.
#
# Binary versions of this program provided by Univention to you as
# well as other copyrighted, protected or trademarked materials like
# Logos, graphics, fonts, specific documentations and configurations,
# cryptographic keys etc. are subject to a license agreement between
# you and Univention and not subject to the GNU AGPL V3.
#
# In the case you use this program under the terms of the GNU AGPL V3,
# the program is provided in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public
# License with the Debian GNU/Linux or Univention distribution in file
# /usr/share/common-licenses/AGPL-3; if not, see
# <http://www.gnu.org/licenses/>.

# mail.schema
# $OID: 1.3.6.1.4.1.10176.1010

attributetype ( 1.3.6.1.4.1.10176.1010.1.1 NAME 'mailPrimaryAddress'
	SUBSTR caseIgnoreSubstringsMatch
	DESC 'Primary mailaddresses for the user'
	EQUALITY caseIgnoreIA5Match
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )

attributetype ( 1.3.6.1.4.1.10176.1010.1.2 NAME 'mailAlternativeAddress'
	SUBSTR caseIgnoreSubstringsMatch
	DESC 'Secondary (alias) mailaddresses for the same user'
	EQUALITY caseIgnoreIA5Match
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )

attributetype ( 1.3.6.1.4.1.10176.1010.1.3 NAME 'mailGlobalSpamFolder'
	DESC 'Move Spam to global spam folder instead of local spam folder'
	EQUALITY caseIgnoreIA5Match
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )

attributetype ( 1.3.6.1.4.1.10176.1010.1.10 NAME 'mailRelay'
	SUBSTR caseIgnoreSubstringsMatch
	DESC 'Domain Mail Relay'
	EQUALITY caseIgnoreIA5Match
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )

objectclass ( 1.3.6.1.4.1.10176.1010.2.10 NAME 'univentionMailDomain'
	DESC 'Univention Mail Domain Preferences' SUP top AUXILIARY
	MAY ( mailRelay ) )

attributetype ( 1.3.6.1.4.1.10176.1010.1.41 NAME 'univentionCanonicalSenderRewriteEnabled'
	DESC 'rewrite sender addresses?'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{10} SINGLE-VALUE )

attributetype ( 1.3.6.1.4.1.10176.1010.1.42 NAME 'univentionCanonicalRecipientRewriteEnabled'
	DESC 'rewrite recipient addresses?'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{10} SINGLE-VALUE )

attributetype ( 1.3.6.1.4.1.10176.1010.1.43 NAME 'univentionInternalPrimaryMailAddress'
	DESC 'primary mail address of user'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} SINGLE-VALUE )

attributetype ( 1.3.6.1.4.1.10176.1010.1.44 NAME 'univentionInternalAlternativeMailAddress'
	DESC 'additional mail addresses'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )

attributetype ( 1.3.6.1.4.1.10176.1010.1.45 NAME 'univentionPublicPrimaryMailAddress'
	DESC 'public mail address of user'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} SINGLE-VALUE )

attributetype ( 1.3.6.1.4.1.10176.1010.1.46 NAME 'univentionPublicAlternativeMailAddress'
	DESC 'additional mail addresses'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )

attributetype ( 1.3.6.1.4.1.10176.1010.1.47 NAME 'mailForwardAddress'
	SUBSTR caseIgnoreSubstringsMatch
	DESC 'External mail addresses to forward the users emails to'
	EQUALITY caseIgnoreMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )


objectclass ( 1.3.6.1.4.1.10176.1010.2.40 NAME 'univentionMailCanonicalMaps'
	DESC 'data for rewriting mail addresses'
	SUP top AUXILIARY
	MAY ( univentionCanonicalSenderRewriteEnabled $ univentionCanonicalRecipientRewriteEnabled $
	      univentionInternalPrimaryMailAddress $ univentionInternalAlternativeMailAddress $ 
		  univentionPublicPrimaryMailAddress $ univentionPublicAlternativeMailAddress ) )


attributetype ( 1.3.6.1.4.1.10176.1010.1.60 NAME 'univentionMailHomeServer'
	DESC 'home server of users mailbox'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} SINGLE-VALUE )

objectclass ( 1.3.6.1.4.1.10176.1010.2.60 NAME 'univentionMailRouting'
	DESC 'data for routing mails'
	SUP top AUXILIARY
	MAY ( univentionMailHomeServer ) )



attributetype ( 1.3.6.1.4.1.10176.1010.1.70 NAME 'univentionMailserverFQDN'
	DESC 'list of available mailserver fqdn'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )

objectclass ( 1.3.6.1.4.1.10176.1010.2.70 NAME 'univentionMailserverList'
	DESC 'data for routing mails'
	SUP top AUXILIARY
	MAY ( univentionMailserverFQDN ) )

attributetype ( 1.3.6.1.4.1.10176.1010.1.80 NAME 'univentionAllowedEmailUsers'
	DESC 'Users that are allowed to send e-mails'
	EQUALITY distinguishedNameMatch
	SUP distinguishedName )

attributetype ( 1.3.6.1.4.1.10176.1010.1.81 NAME 'univentionAllowedEmailGroups'
	DESC 'Groups that are allowed to send e-mails'
	EQUALITY distinguishedNameMatch
	SUP distinguishedName )



attributetype ( 1.3.6.1.4.1.10176.1010.1.90
	NAME 'univentionMailUserNamespace'
	DESC 'use namespace "user" instead of "shared" for shared folders'
	EQUALITY booleanMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE)

attributetype ( 1.3.6.1.4.1.10176.1010.1.91
	NAME 'univentionMailSharedFolderDeliveryAddress'
	DESC 'use given mailaddress for mail delivery to shared folder'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE)

attributetype ( 1.3.6.1.4.1.10176.1010.1.92
	NAME 'univentionMailUserQuota'
	DESC 'Mailbox hard quota limit in MB'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )

attributetype ( 1.3.6.1.4.1.10176.1010.1.93
	NAME 'univentionMailACL'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )

objectclass ( 1.3.6.1.4.1.10176.1010.2.90
	NAME 'univentionMailSharedFolder'
	DESC 'Univention shared folder'
	SUP top STRUCTURAL
	MUST ( cn )
	MAY ( mailPrimaryAddress $ mailAlternativeAddress $ univentionMailUserNamespace $ univentionMailSharedFolderDeliveryAddress $ univentionMailACL $ univentionMailUserQuota $ univentionMailHomeServer ) )


attributetype ( 1.3.6.1.4.1.10176.1010.1.100
	NAME 'univentionMailMember'
	DESC 'Univention Mailinglist Member'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )

objectclass ( 1.3.6.1.4.1.10176.1010.2.100
	NAME 'univentionMailList'
	DESC 'Univention Mailinglist'
	SUP top STRUCTURAL
	MUST ( cn )
	MAY (mailPrimaryAddress $ description $ univentionMailMember $ univentionAllowedEmailGroups $ univentionAllowedEmailUsers) )


objectclass ( 1.3.6.1.4.1.10176.1012.2.1
  NAME 'univentionMailDomainname'
  DESC 'Univention Mail Domain'
  SUP top STRUCTURAL
  MUST ( cn ) )


objectclass ( 1.3.6.1.4.1.10176.1010.2.1 NAME 'univentionMail'
	DESC 'Univention Mail Preferences' SUP top AUXILIARY
	MUST ( uid )
	MAY ( univentionMailHomeServer $ mailPrimaryAddress $ mailAlternativeAddress $ mailGlobalSpamFolder $ univentionMailUserQuota $ mailForwardAddress ) )