Skip to content

Commit

Permalink
Adding mailAliasList.ldif for OpenLDAP olc
Browse files Browse the repository at this point in the history
  • Loading branch information
enspritz committed Nov 21, 2019
1 parent bfe7599 commit cfd76b6
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 16 deletions.
21 changes: 21 additions & 0 deletions schemas/mailAliasList.ldif
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright Vivid Inc. Released under the terms of the Apache 2.0 license.
#
# See `mailAliasList.schema' for details.
#
# To add this schema to OpenLDAP using its dynamic runtime configuration
# engine "olc" introduced in version OpenLDAP 2.3:
#
# slapadd -n 0 -l mailAliasList.ldif

dn: cn=mailaliaslist,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: mailaliaslist
olcAttributeTypes: {0}( 1.3.6.1.4.1.54908.1.1.1 NAME 'mailAlias' DESC 'Mail
address alias' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMa
tch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
olcAttributeTypes: {1}( 1.3.6.1.4.1.54908.1.1.2 NAME 'memberDn' DESC 'Alias
redirects to members identified by DN' EQUALITY distinguishedNameMatch SYNT
AX 1.3.6.1.4.1.1466.115.121.1.12 )
olcObjectClasses: {0}( 1.3.6.1.4.1.54908.1.1.3 NAME 'mailAliasList' DESC 'Em
ail address alias redirection list' SUP top STRUCTURAL MAY ( mailAlias $ me
mberDn ) )
40 changes: 24 additions & 16 deletions schemas/mailAliasList.schema
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
#
# Defines a mail alias list structural object and its attendant attributes.
# Useful for receiving mail on virtual email addresses (mail aliases) and
# forwarding to actual email accounts. This schema depends on core.schema.

# forwarding to actual email accounts.
#
# This schema depends on core.schema. It has been battle-tested in
# production on OpenLDAP for several years prior to being open-sourced.
# The object class and attribute types are namespaced within Vivid Inc.'s
# own IANA-assigned Private Enterprise Number (PEN) 54908, listed at
# https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers
#
# Example:
# Here is an example LDAP object record utilizing the `mailAliasList'
# structural object. An email received at any of the `mailAlias' email
Expand Down Expand Up @@ -33,9 +39,9 @@
# server_host = ldap-server.internal.acme.com
# server_port = 389
#
# # Upon receipt of an incoming email, take its TO: email address, and
# # substitute that into the `query_filter'. Search for all matching LDAP
# # record under `search_base'.
# # Upon receipt of an incoming email, take its TO: email address
# # and substitute that into the `query_filter'. Search for all
# # matching LDAP records under `search_base' using that filter.
# search_base = ou=mailaliases,dc=acme,dc=com
# query_filter = (mailAlias=%s)
#
Expand All @@ -49,26 +55,28 @@
# schema provides is the structuring within your mail alias list object
# DNs for mapping virtual email aliases to forwarding email addresses,
# ready for consumption by your MTA, etc.

#
# To add this schema to OpenLDAP see the corresponding `mailAliasList.ldif'.
#
# Changelog:
# 20191120
# - Formally organized under Vivid's IANA PEN 1.3.6.1.4.1.54908.
# - Released as Open Source under the terms of the Apache 2.0 license.
# 20140626
# - First written.

attributetype ( 1.3.6.1.4.1.54908.1.1.1 NAME 'memberDn'
DESC 'Alias redirects to members identified by DN'
EQUALITY distinguishedNameMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
# - First authored.

attributetype ( 1.3.6.1.4.1.54908.1.1.3 NAME 'mailAlias'
attributetype ( 1.3.6.1.4.1.54908.1.1.1 NAME 'mailAlias'
DESC 'Mail address alias'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )

objectclass ( 1.3.6.1.4.1.54908.1.1.2 NAME 'mailAliasList'
attributetype ( 1.3.6.1.4.1.54908.1.1.2 NAME 'memberDn'
DESC 'Alias redirects to members identified by DN'
EQUALITY distinguishedNameMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )

objectclass ( 1.3.6.1.4.1.54908.1.1.3 NAME 'mailAliasList'
DESC 'Email address alias redirection list'
SUP top STRUCTURAL
MUST ( cn $ description $ mailAlias )
MAY memberDn )
MAY ( mailAlias $ memberDn ) )

0 comments on commit cfd76b6

Please sign in to comment.