1

Topic: Add fields to Roundcube LDAP address book?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: CentOS 7.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue: NA
====

I have a requirement to add a "backupMailAddress" attribute to my LDAP addressbook to store a "home/personal" email address, and be user-editable in Roudcube's Global LDAP Address Book.

So far, I've managed to make the address book editable, but I cannot see how/where I'd go about adding a custom field like "Home Email Address" that's tied to the backupMailAddress LDAP attribute.

Is this doable?  Is there another or better way?

----

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

2

Re: Add fields to Roundcube LDAP address book?

Didn't try it before. Might be better to ask in Roundcube mailing list instead.
http://lists.roundcube.net/mailman/listinfo

3

Re: Add fields to Roundcube LDAP address book?

Figured it out!

In roundcube's config.inc.php, you need to change the ldap field definition for email as follows:

        // 'email'       => 'mail:*',
        'email:work'  => 'mail',
        'email:other' => 'backupMailAddress',

And make the address book editable:

// 'writable'      => false,
'writable'      => true,

Then, in your slapd.conf file, allow users to write to backupMailAddress and other users to read that value:

# Allow to read others public info.
access to attrs="cn,sn,gn,givenName,telephoneNumber,backupmailaddress"
    by anonymous    auth
    by self         write
    by dn.exact="cn=vmail,dc=youcantspoilababy,dc=org"   read
    by dn.exact="cn=vmailadmin,dc=youcantspoilababy,dc=org"  write
    by users        read

That's it!  Now your users can add an alternate email address in the address book, and other users can view it.

4

Re: Add fields to Roundcube LDAP address book?

Thanks for sharing. smile