aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem.moulin@fripost.org>2012-04-29 00:40:40 +0200
committerGuilhem Moulin <guilhem.moulin@fripost.org>2012-04-29 00:40:40 +0200
commit7ffd1962666c745ae27d03157dc0473035887a67 (patch)
tree8fc9e54fc6e795b69ecd1e78d2c26500ab30158d
parentad0038bb1fdd526a1cb2ae837a1d14b514c91384 (diff)
Forgot ‘ldap_virtual_mailbox_maps.cf‘.
-rw-r--r--fripost-docs.org36
1 files changed, 26 insertions, 10 deletions
diff --git a/fripost-docs.org b/fripost-docs.org
index 240c891..b872817 100644
--- a/fripost-docs.org
+++ b/fripost-docs.org
@@ -915,15 +915,15 @@ a new ACL with writable [ou=domains,...]/children, and [dc=...,ou=domains,...]/e
dn: o=mailHosting,dc=fripost,dc=org
objectClass: organization
description: Mail hosting
-
+
dn: ou=domains,o=mailHosting,dc=fripost,dc=org
objectClass: organizationalUnit
description: Virtual Hosting
-
+
dn: ou=managers,o=mailHosting,dc=fripost,dc=org
objectClass: organizationalUnit
description: Postmasters
-
+
dn: ou=services,o=mailHosting,dc=fripost,dc=org
objectClass: organizationalUnit
description: E-mail services
@@ -942,42 +942,42 @@ To delete a leaf (`-r' to delete the whole sub-tree):
objectClass: simpleSecurityObject
objectClass: organizationalRole
userPassword: {SSHA}xxxxxx
-
+
dn: cn=admin1,ou=managers,o=mailHosting,dc=fripost,dc=org
objectClass: simpleSecurityObject
objectClass: organizationalRole
userPassword: {SSHA}xxxxxx
-
+
dn: dc=fripost.org,ou=domains,o=mailHosting,dc=fripost,dc=org
objectClass: virtualDomain
isActive: TRUE
-
+
dn: uid=user,dc=fripost.org,ou=domains,o=mailHosting,dc=fripost,dc=org
objectClass: virtualMailbox
gn: First Name
sn: Last Name
userPassword: {SSHA}xxxxxx
isActive: TRUE
-
+
dn: dc=example.org,ou=domains,o=mailHosting,dc=fripost,dc=org
objectClass: virtualDomain
owner: uid=user,dc=fripost.org,ou=domains,o=mailHosting,dc=fripost,dc=org
isActive: TRUE
-
+
dn: mailTarget=user-alias@fripost.org,dc=example.org,ou=domains,o=mailHosting,dc=fripost, dc=org
objectClass: inetLocalMailRecipient
objectClass: virtualAliases
isActive: TRUE
mailLocalAddress: user
mailLocalAddress: user-alias
-
+
dn: uid=user2,dc=fripost.org,ou=domains,o=mailHosting,dc=fripost,dc=org
objectClass: virtualMailbox
gn: First Name
sn: Last Name
userPassword: {SSHA}xxxxxx
isActive: FALSE
-
+
dn: mailTarget=user@fripost.org,dc=fripost.org,ou=domains,o=mailHosting,dc=fripost,dc=org
objectClass: inetLocalMailRecipient
objectClass: virtualAliases
@@ -1212,6 +1212,7 @@ sudo aptitude install dovecot-imapd
:: /etc/postfix/main.cf
virtual_mailbox_domains = ldap:$config_directory/ldap_virtual_mailbox_domains.cf
+ virtual_mailbox_maps = ldap:$config_directory/ldap_virtual_mailbox_maps.cf
virtual_alias_maps = ldap:$config_directory/ldap_virtual_alias_maps.cf
[...]
@@ -1239,6 +1240,20 @@ Test it:
postmap -q fake.org ldap:/etc/postfix/ldap_virtual_domains_maps.cf || echo 'failed!'
+:: /etc/postfix/ldap_virtual_mailbox_maps.cf
+ server_host = ldapi://
+ version = 3
+ search_base = uid=%u,dc=%d,ou=domains,o=mailHosting,dc=fripost,dc=org
+ scope = base
+ bind = no
+ query_filter = (&(ObjectClass=virtualMailbox)(uid=%u)(isActive=TRUE))
+ result_attribute = uid
+
+Test it:
+ postmap -q user@fripost.org ldap:/etc/postfix/ldap_virtual_mailbox_maps.cf || echo 'failed!'
+ postmap -q fake@fake.org ldap:/etc/postfix/ldap_virtual_mailbox_maps.cf || echo 'failed!'
+
+
:: /etc/postfix/ldap_virtual_alias_maps.cf
server_host = ldapi://
@@ -1253,6 +1268,7 @@ Test it:
postmap -q user-alias@fripost.org ldap:/etc/postfix/ldap_virtual_alias_maps.cf
postmap -q user@example.org ldap:/etc/postfix/ldap_virtual_alias_maps.cf
+
(The main LDAP server is partly replicated on a UNIX socket on the MX's.)
**** Test delivery