[horde] How to prevent syncml from from combining multiple email addresses into one...
Simon Wilson
simon at simonandkate.net
Wed Oct 16 01:56:00 UTC 2013
----- Message from Jan Schneider <jan at horde.org> ---------
Date: Tue, 15 Oct 2013 13:11:35 +0200
From: Jan Schneider <jan at horde.org>
Subject: Re: [horde] How to prevent syncml from from combining
multiple email addresses into one...
To: horde at lists.horde.org
> Zitat von Mehmet Giritli <mgiritli at giritli.eu>:
>
>> On Thu, 2013-09-26 at 19:38 +0300, Mehmet Giritli wrote:
>>> On Thu, 2013-09-26 at 17:13 +0200, Jan Schneider wrote:
>>>> Zitat von Mehmet Giritli <mgiritli at giritli.eu>:
>>>>
>>>> > On Thu, 2013-08-29 at 10:29 +0200, Jan Schneider wrote:
>>>> >> Zitat von Mehmet Giritli <mgiritli at giritli.eu>:
>>>> >>
>>>> >> > On Thu, 2013-08-15 at 15:48 +0200, Jan Schneider wrote:
>>>> >> >> Zitat von Mehmet Giritli <mgiritli at giritli.eu>:
>>>> >> >>
>>>> >> >> > On Tue, 2013-08-13 at 11:06 +0200, Jan Schneider wrote:
>>>> >> >> >> Zitat von Mehmet Giritli <mgiritli at giritli.eu>:
>>>> >> >> >>
>>>> >> >> >> > Hi,
>>>> >> >> >> >
>>>> >> >> >> > I use syncml official client to sync contacts between horde
>>>> >> with ldap
>>>> >> >> >> > backend and my android phone. My many contacts naturally
>>>> >> have multiple
>>>> >> >> >> > email addresses. When I completely reload the device from
>>>> >> server, I can
>>>> >> >> >> > see multiple emails syncing up correctly. But When I sync
>>>> >> >> something from
>>>> >> >> >> > the device to server, contacts with multiple emails
>>>> get their emails
>>>> >> >> >> > combined (comma seperated) into one email field on the
>>>> ldap server.
>>>> >> >> >> >
>>>> >> >> >> > For the second time I had to go through my contacts and spend
>>>> >> >> an hour to
>>>> >> >> >> > correct the corruption. Is there a way to prevent this from
>>>> >> happening
>>>> >> >> >> > and still sync new contacts from device to the server?
>>>> >> >> >> >
>>>> >> >> >> > Regards.
>>>> >> >> >>
>>>> >> >> >> What is an "official syncml client"?
>>>> >> >> >
>>>> >> >> > Synthesis syncml client.
>>>> >> >> >
>>>> >> >> > http://www.synthesis.ch/
>>>> >> >> >
>>>> >> >> >
>>>> >> >> >> Anyway, without more information
>>>> >> >> >> about your address book mappings there isn't much we can tell.
>>>> >> >> >
>>>> >> >> > This is the addressbook that is selected for sync. Removed
>>>> >> some data for
>>>> >> >> > privacy.
>>>> >> >> >
>>>> >> >> > $cfgSources['gollum.mehmet.sync'] = array(
>>>> >> >> > 'disabled' => false,
>>>> >> >> > 'title' => _("GOLLUM (Mehmet Sync)"),
>>>> >> >> > 'type' => 'ldap',
>>>> >> >> > 'params' => array(
>>>> >> >> > 'server' => '',
>>>> >> >> > 'port' => 389,
>>>> >> >> > 'tls' => true,
>>>> >> >> > 'version' => 3,
>>>> >> >> > 'root' => '',
>>>> >> >> > 'bind_dn' => '',
>>>> >> >> > 'bind_password' => '',
>>>> >> >> > 'dn' => array('uid'),
>>>> >> >> > 'objectclass' => array('top',
>>>> >> >> > 'person',
>>>> >> >> > 'organizationalPerson',
>>>> >> >> > 'inetOrgPerson',
>>>> >> >> > 'evolutionPerson'),
>>>> >> >> > 'scope' => 'sub',
>>>> >> >> > 'charset' => 'utf-8',
>>>> >> >> > 'filter' => '&(objectClass=person)(!(cn=admin))',
>>>> >> >> >
>>>> >> >> > ),
>>>> >> >> > 'map' => array(
>>>> >> >> > '__key' => 'dn',
>>>> >> >> > '__uid' => 'uid',
>>>> >> >> > 'name' => 'cn',
>>>> >> >> > 'firstname' => 'givenName',
>>>> >> >> > 'lastname' => 'sn',
>>>> >> >> > 'middlenames' => 'initials',
>>>> >> >> > 'emails' => 'mail',
>>>> >> >>
>>>> >> >> Having a single field for all addresses is exactly what you
>>>> >> configured here.
>>>> >> >>
>>>> >> >
>>>> >> > Sorry for the late reply. If I put 'email' instead, then I
>>>> get only one
>>>> >> > email address synchronized to the device. But yea, the problem I
>>>> >> > mentioned can be avoided this way, I know.
>>>> >> >
>>>> >> > So, is there a way syncing multiple multiple email addresses
>>>> over syncml
>>>> >> > without the original problem I mentioned happening?
>>>> >>
>>>> >> Yes, if you use the more specialized homeEmail and workEmail Turba
>>>> >> attributes.
>>>> >
>>>> >
>>>> > So, I was up for solving this problem finally but I noticed that it is
>>>> > not that easy actually. The problem in the case of a ldap source is that
>>>> > multiple emails are stored with essentially the same attributes, which
>>>> > is called 'mail'. So In the turba backends configuration file, how can I
>>>> > separate this mail attribute and assign it to an horde attribute for
>>>> > each email address in it?
>>>> >
>>>> >> --
>>>> >> Jan Schneider
>>>> >> The Horde Project
>>>> >> http://www.horde.org/
>>>> >>
>>>>
>>>> With the 'emails' attribute.
>>>
>>> Thanks for your email Jan but that takes me back to square one, doesn't
>>> it? What I had initially was:
>>>
>>> 'emails' => 'mail'
>>>
>>> in my backends file for ldap. This showed multiple emails and synced
>>> them correctly to other devices only partially:
>>>
>>> When I completely reload the device from server, I can see multiple
>>> emails syncing up correctly. But When I sync something from the device
>>> to server, contacts with multiple emails get their emails combined
>>> (comma seperated) into one email field on the ldap server.
>>>
>>> So I changed to:
>>>
>>> 'email' => 'mail'
>>>
>>> But now I can only see one email address per contact in the device after
>>> sync. Your advice was to use homeEmail and workEmail attributes in the
>>> backends file, one for each email address, but I don't know how to do
>>> that with ldap since all email addresses are combined under 'mail' ldap
>>> attribute.
>>>
>>> I hope it is clear now and sorry for the late reply which caused you to
>>> forget the problem...
>>>
>>
>> Jan, I think my message was overlooked. Can you try to answer my
>> question please? I want to be able to sync multiple emails with my phone
>> if I can...
>
> This simply doesn't work with your setup, since you want to map a
> single Turba attribute (emails) into multiple LDAP attributes of the
> same name (mail). This is not supported by Turba.
> As you noticed, it works when reading from LDAP, because we combine
> attributes value with a customizable separator (defaults to ", ") if
> the LDAP server returns multiple values for the same attribute name.
> But the opposite direction is not as easy. We don't know if an
> attribute value from Turba that contains a separator is really a
> multi-value attribute or just contains it by coincidence. We don't
> know if the matching LDAP attribute supports multiple values either.
> With the flexible approach and attribute mapping that Turba
> supports, I don't see a solution for that problem that would work
> generically.
> --
> Jan Schneider
This was the reason I changed my Turba backend to SQL from LDAP. I
still use LDAP for a read only global address list, but user address
books are held in MySQL.
Simon
--
Simon Wilson
M: 0400 12 11 16
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 1339 bytes
Desc: PGP Public Key
URL: <http://lists.horde.org/archives/horde/attachments/20131016/984bcadb/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: PGP Digital Signature
URL: <http://lists.horde.org/archives/horde/attachments/20131016/984bcadb/attachment-0001.bin>
More information about the horde
mailing list