Difference between revisions of "Generic LDAP Integration"

[unchecked revision][unchecked revision]
Line 1: Line 1:
= Synchronizing User Accounts with a Generic LDAP Directory Service =
+
{{Directory Services Preamble|LDAP server}}
  
In addition to adding users manually (which is described in chapter [[Users,_Folders_and_Settings#User_Management|User Management]]), MailStore can
+
== Accessing Directory Service Integration ==
synchronize its internal user database with your company's generic LDAP directory service (e.g. OpenLDAP, Novell eDirectory).
+
{{Directory Services Accessing Configuration|LDAP server|Mldap_sync_01.png}}
 +
 
 +
== Connection to the LDAP Directory Service ==
 +
For synchronization MailStore Server requires information on how to connect to the LDAP directory service and how to obtain the required data from it.
 +
 
 +
=== LDAP Connection ===
 +
 
 +
{| class="wikitable"
 +
! width=250px | Name
 +
! Description
 +
|-
 +
| Server Name
 +
| DNS name or IP address of your LDAP server
 +
|-
 +
| Protocol
 +
| Configure whether the connection to the LDAP server is to be unencrypted on port 389, LDAP-TLS on port 389, or LDAP-SSL on port 636
 +
|-
 +
| Ignore SSL Security Warnings (only when using LDAP-TLS or LDAP-SSL)
 +
| Permit connections when a self-signed or non-public certificate is used by the LDAP server
 +
|-
 +
| Administrative DN
 +
| Distinguished Name (DN) or user name of a user with appropriate privileges on the LDAP server
 +
|-
 +
| Password
 +
| Password of the user specified in Administrative DN
 +
|-
 +
| Base DN
 +
| LDAP base DN, if needed
 +
|}
 +
 
 +
=== User Filter and Attributes ===
 +
 
 +
{| class="wikitable"
 +
! width=250px | Name
 +
! Description
 +
|-
 +
| Filter (optional)
 +
| Filter LDAP objects to return only user objects with email addresses
 +
|-
 +
| User Name
 +
| The LDAP attribute containing the username that you wish MailStore to use
 +
|-
 +
| Local Part Only (E-mail Addresses / UPN)
 +
| If unchecked, MailStore will use the full username including domain portion, e.g. ''username@example.com''. If checked, MailStore will only use the local part of the User Name specified, e.g. the ''username''
 +
|-
 +
| Full Name (optional)
 +
| The full name of the user, for display purposes within MailStore
 +
|-
 +
| E-mail Addresses (opt.)
 +
| The LDAP attribute containing the user's email address. This can contain multiple, comma separated, e-mail addresses
 +
|}
 +
 
 +
=== Group Filter and Attributes ===
 +
{| class="wikitable"
 +
! width=250px | Name
 +
! Description
 +
|-
 +
| Filter
 +
| LDAP filter to return only group objects
 +
|-
 +
| Name
 +
| The LDAP attribute that contains the common name of a group
 +
|-
 +
| Description (optional)
 +
| The LDAP attribute that contains a human readable description for each group
 +
|-
 +
| Members
 +
| The LDAP attribute that contains the common name of group members
 +
|-
 +
| Search Filter for Members
 +
| LDAP filter to resolve group members when members are not specified as a DN string as part of the group results. MailStore will fill in the <tt>{member}</tt> variable with values from the ''Members'' attribute
 +
|-
 +
| Group
 +
| The actual group(s) containing users that MailStore Server will synchronize
 +
|}
 +
 
 +
=== Options ===
 +
 
 +
{| class="wikitable"
 +
! width=250px | Name
 +
! Description
 +
|-
 +
| Automatically delete users in MailStore Server
 +
| If enabled, MailStore will delete users from the local MailStore database when the user is deleted, removed from the filtered group, or falls out of scope based on the above LDAP filter settings
 +
|}
 +
 
 +
 
 +
{{Directory Services Assign Default Privileges}}
 +
 
 +
= Configuration Samples =
 +
 
 +
== Active Directory ==
 +
 
 +
It is possible to connect LDAP Generic to Active Directory, allowing for more flexibility and control than MailStore's built-in Active Directory support. For example, LDAP Generic will allow you to accept invalid or self-signed certificates, use custom filters or change which attributes are used by MailStore.
 +
 
 +
It is assumed that the Active Directory LDAP service is reachable by the MailStore instance on TCP port 389 or 636, including opening ports in the firewall, where applicable.
 +
 
 +
As most Active Directory configurations are quite similar, it will be possible to copy/paste most of the examples below, making only minor modifications based on your environment.
 +
 
 +
=== LDAP Connection ===
 +
 
 +
{| class="wikitable"
 +
! width=250px | Name
 +
! Description
 +
! Example
 +
|-
 +
| Server Name
 +
| DNS name or IP address of an Active Directory domain controller.
 +
| <tt>dc001.example.com</tt>
 +
|-
 +
| Protocol
 +
| Active Directory requires encryption
 +
| ''LDAP-TLS'' or ''LDAP-SSL''
 +
|-
 +
| Ignore SSL Security Warnings
 +
| Active Directory uses self-signed certificates by default.
 +
| ''Checked''
 +
|-
 +
| Administrative DN
 +
| Active Directory account for MailStore's use
 +
| <tt>mailstoreserver@example.com</tt>
 +
|-
 +
| Password
 +
| Password of the user specified in '''Administrative DN''' above
 +
| <tt>MySecretPassword</tt>
 +
|-
 +
| Base DN
 +
| LDAP base DN will be detected automatically in Active Directory environments
 +
| ''Blank''
 +
|}
  
During synchronization user information such as user names and email addresses are read from the LDAP directory and recorded in MailStore Server's user database. MailStore Server makes no changes to the LDAP directory itself. The scope of the synchronization can be limited through filters.
+
=== User Filter and Attributes ===
  
== Accessing Directory Service Integration ==
+
{| class="wikitable"
 +
! width=250px | Name
 +
! Description
 +
! Example
 +
|-
 +
|rowspan = 4 | Filter (optional)
 +
|All users with Exchange e-mail addresses
 +
|<tt>(&(objectCategory=User)(proxyAddresses=*))</tt>
 +
|-
 +
|All users with Exchange e-mail addresses who are also listed in the global address book
 +
|<tt>(&(objectCategory=User)(proxyAddresses=*)(mail=*))</tt>
 +
|-
 +
|All users with Active Directory e-mail addresses
 +
|<tt>(&(objectCategory=User)(mail=*))''</tt>
 +
|-
 +
|All users
 +
|<tt>(objectCategory=User)</tt>
 +
|-
 +
|rowspan = 2 |User Name
 +
|Active Directory user name
 +
|<tt>userPrincipalName</tt>
 +
|-
 +
|NT4 style account name
 +
|<tt>sAMAccountName</tt>
 +
|-
 +
|rowspan = 2 |Local Part Only (E-mail Addresses / UPN)
 +
|Use the fully qualified username@domain
 +
|''Unchecked''
 +
|-
 +
|Only use the local part of the User Name
 +
|''Checked''
 +
|-
 +
|Full Name (optional)
 +
|The user's visible name in Active Directory
 +
|<tt>displayName</tt>
 +
|-
 +
|rowspan = 2 |E-mail Addresses (opt.)
 +
|Exchange environments
 +
|<tt>proxyAddress</tt>
 +
|-
 +
|Non-Exchange environments
 +
|<tt>mail</tt>
 +
|}
  
*Log on to MailStore Client as a MailStore Server administrator.
+
=== Group Filter and Attributes ===
*Click on ''Administrative Tools'' > ''Users and Privileges'' and then on ''Directory Services''.
+
{| class="wikitable"
*In the ''Integration'' section, change the directory service type to ''LDAP Generic''.
+
! width=250px | Name
 +
! Example
 +
|-
 +
|Filter
 +
|<tt>(objectCategory=Group)</tt>
 +
|-
 +
|Name
 +
|<tt>cn</tt>
 +
|-
 +
|Description (optional)
 +
|<tt>description</tt>
 +
|-
 +
|Members
 +
|<tt>member</tt>
 +
|-
 +
|Search Filter for Members
 +
|''blank''
 +
|-
 +
|Group
 +
|''Active Directory Security Group(s)''
 +
|}
  
[[File:Mldap_sync_01.png|center|450px]]
+
== OpenLDAP ==
  
== Connection to the LDAP Directory Service ==
+
OpenLDAP is a commonly used LDAP server, configuration will require some knowledge of your LDAP environment.
  
For synchronization MailStore Server requires information on how to connect to the LDAP directory service.
+
It is assumed that the LDAP service is reachable by the MailStore instance on TCP port 389 or 636, including opening ports in the firewall, where applicable.
  
*'''Server Name'''<br/>DNS name or IP address of the LDAP server.
+
As OpenLDAP is very flexible, configuration options vary from server to server and you may need to make significant modifications to the examples below to fit the schema used in your environment.
*'''Encryption'''<br/>Configure whether the connection to the LDAP server is to be unencrypted or LDAP-TLS/LDAP-SSL encrypted.
 
*'''Ignore SSL Security Warnings (only when using LDAP-TLS or LDAP-SSL)'''<br/>Activate this option if a self-signed or non-public certificate is used on the LDAP server.
 
*'''Administrative DN'''<br/>Distinguished Name (DN) of a user with administrative privileges on the LDAP server.
 
*'''Password'''<br/>Password of that user.
 
  
== LDAP Scope ==
+
=== LDAP Connection ===
  
After configuring the connection settings as described above, you can specify filter criteria for the LDAP directory service synchronization in this section.
+
{| class="wikitable"
 +
! width=250px | Name
 +
! Example
 +
|-
 +
| Server Name
 +
| <tt>directory.example.com</tt>
 +
|-
 +
| Protocol
 +
| <tt>LDAP-SSL</tt>
 +
|-
 +
| Ignore SSL Security Warnings
 +
| ''Checked''
 +
|-
 +
| Administrative DN
 +
| <tt>cn=admin,dc=example,dc=com</tt>
 +
|-
 +
| Password
 +
| <tt>MySecretPassword</tt>
 +
|-
 +
| Base DN
 +
| <tt>dc=example,dc=com</tt>
 +
|}
  
*'''Base-DN'''<br/>LDAP base DN, e.g. ''dc=mycompany,dc=local''
+
=== User Filter and Attributes ===
*'''Filter (optional)'''<br/>RFC 4515 compliant LDAP filter, e.g. ''(&(objectclass=posixAccount)(mail=*))''
 
  
== LDAP-Attributes ==
+
{| class="wikitable"
 +
! width=250px | Name
 +
! Example
 +
|-
 +
| Filter (optional)
 +
| <tt>(objectClass=posixAccount)</tt>
 +
|-
 +
| User Name
 +
| <tt>uid</tt>
 +
|-
 +
| Local Part Only (E-mail Addresses / UPN)
 +
| ''Unchecked''
 +
|-
 +
| Full Name (optional)
 +
| <tt>displayName</tt>
 +
|-
 +
| E-mail Addresses (opt.)
 +
| <tt>mail</tt>
 +
|}
  
Specify how LDAP user attributes should be mapped to the MailStore user attributes:
+
=== Group Filter and Attributes ===
  
*'''User Name'''<br/>LDAP attribute for the user name, e.g. ''cn'' or ''uid''.
+
{| class="wikitable"
*'''Full Name (optional)'''<br/>LDAP attribute for the display name, e.g. ''displayName''.
+
! width=250px | Name
*'''Email addresses (optional)'''<br/>LDAP attribute for the SMTP address, e.g. ''mail''. Multiple addresses can be specified, separated by comma.
+
! Example
 +
|-
 +
| Filter
 +
| <tt>(objectClass=posixGroup)</tt>
 +
|-
 +
| Name
 +
| <tt>cn</tt>
 +
|-
 +
| Description (optional)
 +
| <tt>description</tt>
 +
|-
 +
| Members
 +
| <tt>memberUid</tt>
 +
|-
 +
| Search Filter for Members
 +
| <tt><nowiki>(|(&(objectClass=posixAccount)(uid={member}))(&(objectClass=posixGroup)(cn={member})))</nowiki></tt>
 +
|-
 +
| Group
 +
| <tt>MailStore Users</tt>
 +
|}
  
{{:Includes:Directory_Services_Options}}
+
{{Directory Services Run Synchronization}}
{{:Includes:Assign_Default_Privileges}}
 
{{:Includes:Run_Directory_Services_Synchronization}}
 
  
 
[[File:mads_sync_02.png|center|450px]]
 
[[File:mads_sync_02.png|center|450px]]
  
{{:Includes:Login_with_Directory_Services_Credentials|LDAP|[[Generic_LDAP_Integration#Synchronizing_User_Accounts_with_a_Generic_LDAP_Directory Service|Synchronizing User Accounts with a Generic LDAP Directory Service]]|[[File:mads_ldapauth_01.png|center|350px]]}}
+
{{Directory Services Login with Directory Services Credentials|LDAP server|mads_ldapauth_01.png}}
 +
 
 +
 
 +
 
  
 
[[de:Generische_LDAP-Integration]]
 
[[de:Generische_LDAP-Integration]]
 +
[[en:Generic LDAP Integration]]

Revision as of 12:55, 25 June 2014

In addition to adding users manually as described in chapter User Management, MailStore Server can synchronize its internal user database with the LDAP server of your organization.

During synchronization, user information, such as user names and email addresses, is copied from the LDAP server into MailStore Server's user database. That way, users can use their LDAP server credentials to also log on to MailStore Server and emails can be assigned to their corresponding user archives automatically, for example. No changes are made to the LDAP server itself by MailStore Server. The scope of the synchronization can be limited through filters.


Accessing Directory Service Integration

  • Log on to MailStore Client as a MailStore Server administrator.
  • Click on Administrative Tools > Users and Archives > Directory Services.
  • In the Integration section, change the directory service type to LDAP server.
Mldap sync 01.png


Connection to the LDAP Directory Service

For synchronization MailStore Server requires information on how to connect to the LDAP directory service and how to obtain the required data from it.

LDAP Connection

Name Description
Server Name DNS name or IP address of your LDAP server
Protocol Configure whether the connection to the LDAP server is to be unencrypted on port 389, LDAP-TLS on port 389, or LDAP-SSL on port 636
Ignore SSL Security Warnings (only when using LDAP-TLS or LDAP-SSL) Permit connections when a self-signed or non-public certificate is used by the LDAP server
Administrative DN Distinguished Name (DN) or user name of a user with appropriate privileges on the LDAP server
Password Password of the user specified in Administrative DN
Base DN LDAP base DN, if needed

User Filter and Attributes

Name Description
Filter (optional) Filter LDAP objects to return only user objects with email addresses
User Name The LDAP attribute containing the username that you wish MailStore to use
Local Part Only (E-mail Addresses / UPN) If unchecked, MailStore will use the full username including domain portion, e.g. username@example.com. If checked, MailStore will only use the local part of the User Name specified, e.g. the username
Full Name (optional) The full name of the user, for display purposes within MailStore
E-mail Addresses (opt.) The LDAP attribute containing the user's email address. This can contain multiple, comma separated, e-mail addresses

Group Filter and Attributes

Name Description
Filter LDAP filter to return only group objects
Name The LDAP attribute that contains the common name of a group
Description (optional) The LDAP attribute that contains a human readable description for each group
Members The LDAP attribute that contains the common name of group members
Search Filter for Members LDAP filter to resolve group members when members are not specified as a DN string as part of the group results. MailStore will fill in the {member} variable with values from the Members attribute
Group The actual group(s) containing users that MailStore Server will synchronize

Options

Name Description
Automatically delete users in MailStore Server If enabled, MailStore will delete users from the local MailStore database when the user is deleted, removed from the filtered group, or falls out of scope based on the above LDAP filter settings


Assigning Default Privileges

By default, users that have been synchronized to MailStore Server from a directory service have the privilege to log on to MailStore Server as well as read access to their own user archive.
You can configure those default privileges before synchronization, for example, to assign the privilege Archive E-mail to all new users. To do this, click on Default Privileges...
More information on managing user privileges and their effects is available in the chapter Users, Folders and Settings which also has details on editing existing privileges.

Configuration Samples

Active Directory

It is possible to connect LDAP Generic to Active Directory, allowing for more flexibility and control than MailStore's built-in Active Directory support. For example, LDAP Generic will allow you to accept invalid or self-signed certificates, use custom filters or change which attributes are used by MailStore.

It is assumed that the Active Directory LDAP service is reachable by the MailStore instance on TCP port 389 or 636, including opening ports in the firewall, where applicable.

As most Active Directory configurations are quite similar, it will be possible to copy/paste most of the examples below, making only minor modifications based on your environment.

LDAP Connection

Name Description Example
Server Name DNS name or IP address of an Active Directory domain controller. dc001.example.com
Protocol Active Directory requires encryption LDAP-TLS or LDAP-SSL
Ignore SSL Security Warnings Active Directory uses self-signed certificates by default. Checked
Administrative DN Active Directory account for MailStore's use mailstoreserver@example.com
Password Password of the user specified in Administrative DN above MySecretPassword
Base DN LDAP base DN will be detected automatically in Active Directory environments Blank

User Filter and Attributes

Name Description Example
Filter (optional) All users with Exchange e-mail addresses (&(objectCategory=User)(proxyAddresses=*))
All users with Exchange e-mail addresses who are also listed in the global address book (&(objectCategory=User)(proxyAddresses=*)(mail=*))
All users with Active Directory e-mail addresses (&(objectCategory=User)(mail=*))
All users (objectCategory=User)
User Name Active Directory user name userPrincipalName
NT4 style account name sAMAccountName
Local Part Only (E-mail Addresses / UPN) Use the fully qualified username@domain Unchecked
Only use the local part of the User Name Checked
Full Name (optional) The user's visible name in Active Directory displayName
E-mail Addresses (opt.) Exchange environments proxyAddress
Non-Exchange environments mail

Group Filter and Attributes

Name Example
Filter (objectCategory=Group)
Name cn
Description (optional) description
Members member
Search Filter for Members blank
Group Active Directory Security Group(s)

OpenLDAP

OpenLDAP is a commonly used LDAP server, configuration will require some knowledge of your LDAP environment.

It is assumed that the LDAP service is reachable by the MailStore instance on TCP port 389 or 636, including opening ports in the firewall, where applicable.

As OpenLDAP is very flexible, configuration options vary from server to server and you may need to make significant modifications to the examples below to fit the schema used in your environment.

LDAP Connection

Name Example
Server Name directory.example.com
Protocol LDAP-SSL
Ignore SSL Security Warnings Checked
Administrative DN cn=admin,dc=example,dc=com
Password MySecretPassword
Base DN dc=example,dc=com

User Filter and Attributes

Name Example
Filter (optional) (objectClass=posixAccount)
User Name uid
Local Part Only (E-mail Addresses / UPN) Unchecked
Full Name (optional) displayName
E-mail Addresses (opt.) mail

Group Filter and Attributes

Name Example
Filter (objectClass=posixGroup)
Name cn
Description (optional) description
Members memberUid
Search Filter for Members (|(&(objectClass=posixAccount)(uid={member}))(&(objectClass=posixGroup)(cn={member})))
Group MailStore Users

Running Directory Services Synchronization

Click on Test Settings to check synchronization configuration and the results returned by the directory service without any changes to the MailStore Server user database being actually committed.

To finally run the synchronization, click on Synchronize now. The results are shown with any changes committed to the MailStore Server user database.

Mads sync 02.png

Login with LDAP server Credentials

After synchronization MailStore users can log on to MailStore Server with their LDAP server username and LDAP server password.