-
Notifications
You must be signed in to change notification settings - Fork 0
/
mailAliasList.schema
83 lines (80 loc) · 3.55 KB
/
mailAliasList.schema
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Copyright Vivid Inc. Released under the terms of the Apache 2.0 license.
#
# An LDAP schema defining a mail alias list structural object class 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. 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'
# object class. An email received at any of the `mailAlias' email
# addresses would be redirected to every one of the email addresses
# associated with the `memberDn' user accounts. The redirection is
# performed by a mail daemon (MTA) configured to consult these
# `mailAliasList` LDAP records.
#
# |-- dn: ou=mailaliases,dc=acme,dc=com
# |-- dn: cn=maintainers,ou=mailaliases,dc=acme,dc=com
# objectClass: mailAliasList
# cn: maintainers
# mailAlias: [email protected]
# mailAlias: [email protected]
# mailAlias: [email protected]
# memberDn: uid=m.laurent,ou=accounts,dc=acme,dc=com
# memberDn: uid=stephane,ou=accounts,dc=acme,dc=com
#
# Postfix configuration `/etc/postfix/ldap-aliases.cf' for the above pattern:
#
# # Query mail aliases as lists of user objects containing addresses.
# # Can be tested with:
# # bash$ postmap -vq [email protected] ldap:/etc/postfix/ldap-aliases.cf
# # More information at http://www.postfix.org/LDAP_README.html
# bind = no
# version = 3
# 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 records under `search_base' using that filter.
# search_base = ou=mailaliases,dc=acme,dc=com
# query_filter = (mailAlias=%s)
#
# # `result_attribute' says: The email address stored in the `mail'
# # attribute is read from `memberDn'.
# special_result_attribute = memberDn
# result_attribute = mail
#
# You can choose the mail alias list object DN organization as well as
# how the actual mail addresses of member DNs are stored. What this LDAP
# 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 authored.
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} )
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
MAY ( mailAlias $ memberDn $ description ) )