OXAE MailingLists with contacts-ldap

Revision as of 10:08, 16 October 2009 by Sonja.krause-harder (talk | contribs) (Created page with 'Conceptual notice: OXAE "mailing lists" are completely transparent to the user, the list is expanded by postfix when the mail is sent. Therefore, this HOWTO describes how to ma...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Conceptual notice:

OXAE "mailing lists" are completely transparent to the user, the list is expanded by postfix when the mail is sent.

Therefore, this HOWTO describes how to map OXAE mailing lists as contacts / users into OX, and not as groups / distribution lists.

It is currently not possible to import OXAE mailing lists

  • Login to the OXAE Management Console web interface

To enable the software repository from where contacts-ldap will be installed:

  • Go to the module "Online updates"
  • in "Components", click on "ox"
  • in the following dialogue, click the box next to "Enabled" and then "Set"
  • back in "Online updates", click "Check for updates" and update if necessary
  • reboot if necessary

Now that the software repository is enabled, install the contacts-ldap bundle:

  • in the OXAE Management Console web interface, choose "Package management"
  • in the Search interface, enter "*ldap" in the "Pattern" search box and click "Search"
  • click on open-xchange-contacts-ldap
  • in the following dialoque, click "Install" and follow the installer workflow.

Configure the contacts-ldap bundle:

  • login with ssh to your OXAE server
  • cd /opt/open-xchange/etc/groupware/contacts-ldap
  • find out your context:
 /opt/open-xchange/sbin/listcontext -A oxadminmaster -P $(cat /etc/ox-secrets/master.secret)


In a standard OXAE installation this should be context 10, and the remainder of this article assumes that it is.

  • create a contacts-ldap config directory for your context.
 mkdir /opt/open-xchange/etc/groupware/contacts-ldap/10
  • create a config file in the context folder defining how the folder with the imported LDAP data will be called, and what data will be imported:
 touch /opt/open-xchange/etc/groupware/contacts-ldap/10/MailingLists.properties

The content of this file should look like this:

# A property file for the context with id 10
# Specify the uri of the LDAP server here e.g. ldap://localhost
com.openexchange.contacts.ldap.context10.MailingLists.uri=ldap://localhost
# Specify the baseDN where the users reside here
com.openexchange.contacts.ldap.context10.MailingLists.baseDN_users=
# Specify the bindDN here (optional)
com.openexchange.contacts.ldap.context10.MailingLists.AdminDN=
# Specify the bindPW here (optional)
com.openexchange.contacts.ldap.context10.MailingLists.AdminBindPW=
# Specify the search base here (sub, base, one)
com.openexchange.contacts.ldap.context10.MailingLists.searchScope=sub
# Specify the type of authentication here. Possible values are "anonymous", "AdminDN" or "user"
com.openexchange.contacts.ldap.context10.MailingLists.authtype=anonymous
# Specify if server-side sorting should be used or if the data should be sorted in the groupware.
# Possible values are "server", "groupware"
com.openexchange.contacts.ldap.context10.MailingLists.sorting=groupware
# Set the login source if user auth is enabled; meaning which source is taken
# to determine a users login for LDAP. If 'login' is set, then user's individual
# mail login as defined in user storage is taken. If 'mail' is set, then user's
# individual primary email address is taken. If 'name' is set, then user's
# individual system's user name is taken.
# Possible values are: login, mail, and name
com.openexchange.contacts.ldap.context10.MailingLists.userLoginSource=name
# Specify the user search filter here (optional). This is the first part which can be chose freely
#com.openexchange.contacts.ldap.context10.MailingLists.userSearchFilter=(objectclass=univentionOxGroup)
# Specify the user search scope here (optional). Possible value are sub, base  and one. If this
# value is left empty the default searchScope will be used
com.openexchange.contacts.ldap.context10.MailingLists.userSearchScope=sub
# Specify the user search attribute here (optional). This value specifies which attribute contains the
# loginname which is used for the groupware
com.openexchange.contacts.ldap.context10.MailingLists.userSearchAttribute=uid
# Specify the baseDN for the user search here (optional). If this value is left empty the global baseDN
# will be used
com.openexchange.contacts.ldap.context10.MailingLists.userSearchBaseDN=
# Specify the user auth type here (optional). Possible values are "anonymous" or "AdminDN"
com.openexchange.contacts.ldap.context10.MailingLists.userAuthType=
# Specify the user AdminDN here (optional). If this value is left empty the global AdminDN will be used
com.openexchange.contacts.ldap.context10.MailingLists.userAdminDN=
# Specify the user AdminBindDN here (optional). If this value is left empty the global AdminBindPW will be used
com.openexchange.contacts.ldap.context10.MailingLists.userAdminBindPW=
# Specify if the value given for uniqueid is a unique long value in LDAP and can be used for
# identifying (setting "false"), or if it's a string value then memorymapping must be enabled
# to generate the longs (setting "true")
# Possible values are "true", "false"
com.openexchange.contacts.ldap.context10.MailingLists.memorymapping=true
# Specify the pagesize for paged results here. e.g. active directory only allows a max page size
# of 1000
com.openexchange.contacts.ldap.context10.MailingLists.pagesize=500
# This properties defines which file contains the mapping for the attributes
com.openexchange.contacts.ldap.context10.MailingLists.mappingfile=mapping.openldap.mailinglists.properties
# Specify the foldername for the global ldap folder here
com.openexchange.contacts.ldap.context10.MailingLists.foldername=Mailing Lists
# Specify the searchfilter for the global ldap folder here
com.openexchange.contacts.ldap.context10.MailingLists.searchfilter=(objectclass=univentionOxGroup)
# Specify what types of contacts should be displayed. May be "users", "distributionlists", or "both"
com.openexchange.contacts.ldap.context10.MailingLists.contactTypes=users
# Specify whether Outlook offers support for this bundle. If this option is
# enabled the contents of the folder are displayed in Outlook, otherwise only
# the folder name is displayed in Outlook but not its contents. Note that even
# if you enable Outlook support, Outlook will not recognize the deletion of
# contacts in LDAP atm.
com.openexchange.contacts.ldap.context10.MailingLists.outlook_support=false
# Specify if the support for detection of deleted object should be enabled for
# ADS, this is only used for the WebDAV interface used by Outlook.
# This feature uses a special information only available on Active Directory. Note
# that the deleted information is only available for the following lifetimes:
# 60 days for forests initially built using W2k and Server 2k3
# 180 days for forests that were initially built with Server 2k3 SP1
com.openexchange.contacts.ldap.context10.MailingLists.ADS_deletion_support=false
# Specify if the ldap server contains referrals and and how to handle them.
# Available options are:
# standard: leaves the setting in the java standard
# follow: follows a referral
# ignore: ignores a referral
# See http://java.sun.com/products/jndi/tutorial/ldap/referral/jndi.html for a
# detailed description
com.openexchange.contacts.ldap.context10.MailingLists.referrals=follow

Note that the names of the properties reflect both the context number and the filename they're in, so if you rename the file, you should also rename the properties.

Edit the property "com.openexchange.contacts.ldap.context10.MailingLists.baseDN_users" to reflect your installation. If your UCS domain is called example.com, this property would be:

com.openexchange.contacts.ldap.context10.MailingLists.baseDN_users=dc=example,dc=com

In the property com.openexchange.contacts.ldap.context10.MailingLists.foldername, specify the name of the public folder in the OX web interface that will contain the imported data. The name may contain spaces, no quotes needed. An example:

com.openexchange.contacts.ldap.context10.MailingLists.foldername=Mailing Lists

The property com.openexchange.contacts.ldap.context10.MailingLists.mappingfile=mapping.openldap.mailinglists.properties specifies the mapping file which will be created in the next step. If you name that file differently, adjust this property too.

  • create a config file in the main contacts-ldap config dir defining the
 mapping between LDAP and open-xchange fields in the main contacts-ldap config directory (not in the context subdirectory):
touch /opt/open-xchange/etc/groupware/contacts-ldap/mapping.openldap.mailinglists.properties
 The content of the file should look like this:
#################
#
# Mappings
# The left side contains the values in OX, and the right side contains the  value name for ldap
# This part contains the openLdap mapping
# Required
 com.openexchange.contacts.ldap.mapping.openldap.mailinglists.uniqueid            = cn
# Optional
com.openexchange.contacts.ldap.mapping.openldap.mailinglists.displayname         = cn
com.openexchange.contacts.ldap.mapping.openldap.mailinglists.surname             = cn
com.openexchange.contacts.ldap.mapping.openldap.mailinglists.email1              = mailPrimaryAddress
# we don't show distributionlists at all, so this is not used, but there's an  exception when it's not there
com.openexchange.contacts.ldap.mapping.openldap.mailinglists.distributionuid = uid
  • restart server
/etc/init.d/open-xchange-groupware restart

Check the configuration

  • Login as a normal user
  • Navigate to "Public folders"
  • The list of public folders should contain a new folder now, containing the
 mailing lists created in the UCS Directory Manager web frontend.

If you want to rename the public folder, do so in the contacts-ldap configuration file and restart the groupware. The folder with the old name will not disappear automatically, but can simply be deleted in the OX web interface by the oxadmin user.