OXAE MailingLists with contacts-ldap: Difference between revisions

From Open-Xchange
No edit summary
No edit summary
Line 23: Line 23:
* In the Search interface, enter "*ldap" in the "Pattern" search box and click "Search"
* In the Search interface, enter "*ldap" in the "Pattern" search box and click "Search"
* Click on <tt>open-xchange-contacts-ldap</tt>
* Click on <tt>open-xchange-contacts-ldap</tt>
* In the following dialoque, click "Install" and follow the installer workflow.
* In the following dialogue, click "Install" and follow the installer workflow.


Next, the bundle needs to be configured:
Next, the bundle needs to be configured:

Revision as of 11:10, 16 October 2009

How to view OXAE mailing lists in a public folder in OX

OXAE "mailing lists" can be created in the Univention Directory Manager web interface. They are completely transparent to the user: the mailing list is expanded by postfix when the mail is sent.

This HOWTO describes how to map OXAE mailing lists as contacts / users into OX. They will be visible in a global address book listed in "Public folders".

This can be achieved by using the contacts-ldap plugin for OX. First, contacts-ldap needs to be installed.

  • Login to the OXAE Management Console web interface

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 dialogue, click "Install" and follow the installer workflow.

Next, the bundle needs to be configured:

  • Login with ssh to your OXAE server
  • Change to the contacts-ldap config directory:
cd /opt/open-xchange/etc/groupware/contacts-ldap
  • Find out the number of the OX context that was set up by OXAE (in a standard OXAE installation this should be context 10, and the remainder of this article assumes that it is):
/opt/open-xchange/sbin/listcontext -A oxadminmaster -P $(cat /etc/ox-secrets/master.secret) 
  • 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=dc=example,dc=com

to reflect your installation. The example above assumes a UCS domain called example.com.

In the property

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

specify the name of the public folder in the OX web interface that will contain the imported data.

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 the OX groupware 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 as explained above 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.

Please note that the contacts imported by contacts-ldap are in some cases only visible in the OX web interface when explicitly searched for. For example, to write an email to one of the imported mailing lists, follow these steps:

  • Click on the "New Email" button in the OX web interface
  • Click on the "To:" or "Cc:" button to open the search window
  • Uncheck the box "Search all contact folders"
  • Click on "Contact folder..." and select the public folder that contains the imported mailing lists
  • Enter the name, or the part of a name of a mailing list (without wildcards) in the "Search" field and click "Go"
  • Click on the desired mailing list and on "Add To:", "Add Cc:" or "Add Bcc:"

Alternatively, it is possible to create a new email to one of the mailing lists directly from the public folder:

  • Navigate to the public folder that contains the imported mailing lists
  • Select a mailing list by clicking on it
  • Click on "Detail" in the panel in the upper part of the OX window
  • Create a new email by clicking directly on the email address of the mailing list.