1

Topic: LDAP Mailing List

============ Required information ====
- iRedMail version: v0.2.2 (MySQL)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Debian Wheezy
- Related log if you're reporting an issue:
====

I'm new to LDAP so I appologize if this question is a bit newbish.

I'm trying to setup a simple LDAP server to use as a global addressbook with mailing lists. I have OpenLDAP with phpldapadmin up and running and it works fine as an address book. But I'm having trouble getting the mailing lists setup. I converted iredmail.schema to the new LDIF format and seemed to get it imported OK as far as I can tell using the intstructions here: LINK. Using this as a guide I've tried setting up the mailing list. I'm running into a couple of problems:

"Choose mailList in ObjectClasses list" - This is not available for me.
"Choose memberOfGroup in drop-down list." - This is not available for me.

So I've been trying to type out the code and import it but I'm running into errors adding members to the group.

An export of 'Groups' looks like:

# Entry 1: ou=Groups,dc=mail,dc=example,dc=com
dn: ou=Groups,dc=mail,dc=example,dc=com
objectclass: organizationalUnit
objectclass: top
ou: Groups

# Entry 2: mail=demolist@example.com,ou=Groups,dc=mail,dc=example...
dn: mail=demolist@example.com,ou=Groups,dc=mail,dc=example,dc=com
accountstatus: active
cn: demolist
enabledservice: mail
enabledservice: deliver
enabledservice: displayedInGlobalAddressBook
mail: demolist@example.com
objectclass: mailList
objectclass: top

I've defined my Users under:

dn: ou=Users,dc=mail,dc=example,dc=com
objectclass: organizationalUnit
objectclass: top
ou: Users

Here is the code I'm trying to import with the given error message.

dn: memberOfGroup=demolist@example.com,ou=Groups,dc=mail,dc=example,dc=com
accountstatus: active
enabledservice: mail
enabledservice: deliver
mail: user01@example.com
mail: user02@example.com
memberofgroup: demolist@example.com
objectclass: mailExternalUser

Gives the following error:

Attribute value would not be unique
This update has been or will be cancelled, it would result in an attribute value not being unique. You might like to search the LDAP server for the offending entry. (Search)
warn    LDIF text import
Could not add object memberOfGroup=demolist@example.com,ou=Groups,dc=mail,dc=example,dc=com
LDAP said:    Success
Error number:    0x00 (LDAP_SUCCESS)
Description:    The operation completed successfully.

I'm guessing that I need to change the dn value? I'm not sure what it should be.

Any suggestions?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: LDAP Mailing List

bmoore wrote:

"Choose mailList in ObjectClasses list" - This is not available for me.
"Choose memberOfGroup in drop-down list." - This is not available for me.

objectClass "mailList" and attribute "memberOfGroup" are provided by iRedMail LDAP schema file (iredmail.schema). If they are not available, that means you don't have iRedMail LDAP schema correctly imported/enabled.

3

Re: LDAP Mailing List

I was able to add the MailList object class to the demolist. And I added the MailUser object class to the user and the memberOfGroup attribute. I set the value to the email address of the list. Now when I send an email to demolist@example.com it is the only address to receive the email. How can I configure it so that mail isn't actually delivered to the demolist address but is sent to the members?

4

Re: LDAP Mailing List

Show us full LDIF data of your accounts, so that we can help troubleshoot.

5

Re: LDAP Mailing List

# LDIF Export for dc=mail,dc=example,dc=com
# Server: My LDAP Server (xxx.xxx.xxx.xxx)
# Search Scope: sub
# Search Filter: (objectClass=*)
# Total Entries: 9
#
# Generated by phpLDAPadmin (http://phpldapadmin.sourceforge.net) on March 26, 2014 1:37 pm
# Version: 1.2.2

version: 1

# Entry 1: dc=mail,dc=example,dc=com
dn: dc=mail,dc=example,dc=com
dc: mail
o: company
objectclass: top
objectclass: dcObject
objectclass: organization

# Entry 2: cn=admin,dc=mail,dc=example,dc=com
dn: cn=admin,dc=mail,dc=example,dc=com
cn: admin
description: LDAP administrator
objectclass: simpleSecurityObject
objectclass: organizationalRole
userpassword: {SSHA}<hash removed>

# Entry 3: ou=Groups,dc=mail,dc=example,dc=com
dn: ou=Groups,dc=mail,dc=example,dc=com
objectclass: organizationalUnit
objectclass: top
ou: Groups

# Entry 4: mail=demolist@example.com,ou=Groups,dc=mail,dc=example...
dn: mail=demolist@example.com,ou=Groups,dc=mail,dc=example,dc=com
accountstatus: active
cn: demolist
enabledservice: mail
enabledservice: deliver
enabledservice: displayedInGlobalAddressBook
mail: demolist@example.com
objectclass: mailList
objectclass: top

# Entry 5: ou=Users,dc=mail,dc=example,dc=com
dn: ou=Users,dc=mail,dc=example,dc=com
objectclass: organizationalUnit
objectclass: top
ou: Users


# Entry 6: cn=Some User,ou=Users,dc=mail,dc=example,dc=com
dn: cn=Some User,ou=Users,dc=mail,dc=example,dc=com
cn: Some_User
givenname: Some_
mail: someuser@example.com
memberofgroup: demolist@example.com
objectclass: inetOrgPerson
objectclass: top
objectclass: mailUser
sn: User
uid: someuser@example.com