Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » OpenLDAP map use regex to extract part of an LDAP attribute
  •  
robertflavia

Messages: 100
Karma: -5
Send a private message to this user
Is it possible to use regular expressions to extract part of an attribute in the openldap.map file?

Example:

in the LDAP database is an attribute called mail. An example value in mail is

firstname.lastname<_at_>domain.com

The mapping in openldap.map is

    <variable>
		<name>MailAddress</name>
		<value><attribute>mail</attribute></value>
    </variable>


However in Kerio admin, the email address becomes

firstname.lastname@domain.com<_at_>domain.com

(where domain.com is the domain setup in kerio-connect).

Is it possible to prevent kerio appending the domain a second time to the mail address ?

Perhaps using regex? I have tried

   <value><attribute>mail:([^@]+)</attribute></value>


But this causes an error in kerio admin.

Kind regards

Robert

[Updated on: Fri, 30 May 2014 15:17]

  •  
rroemhild

Messages: 3
Karma: 2
Send a private message to this user
As far as i know this does not work. I use the kerio-Mail-Userid attribute for the userid and map the PreferredAddress variable to the mail attribute for the users main email address. In kerio-Mail-Userid is the first part of the main email address as i only use one mail domain with the kerio server. In a multi-domain setup you may use a more unique userid.

<variable>
  <name>Name</name>
  <value>
    <attribute>kerio-Mail-Userid</attribute>
  </value>
</variable>

<variable>
  <name>PreferredAddress</name>
  <value>
    <attribute>mail</attribute>
  </value>
</variable>


Kind regards
Rafael
  •  
robertflavia

Messages: 100
Karma: -5
Send a private message to this user
Thanks for your help rroemhild.

Cool PreferredAddress works!

[Updated on: Tue, 03 June 2014 13:52]

  •  
robertflavia

Messages: 100
Karma: -5
Send a private message to this user
Hello Kerio,

is there any suggestion from Kerio to avoid this?

Kind regards

Robert
Previous Topic: Migrating Kerio 7.4.1 to 8.3 Questions
Next Topic: Email signature
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Tue Oct 17 18:52:09 CEST 2017

Total time taken to generate the page: 0.00432 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.