[Bug 221447] Missing LDAP attributes and inconsistent handling of e-mail addresses

rdratlos at yahoo.co.uk rdratlos at yahoo.co.uk
Thu Jan 7 14:16:42 GMT 2010


https://bugs.kde.org/show_bug.cgi?id=221447





--- Comment #3 from  <rdratlos yahoo co uk>  2010-01-07 15:16:40 ---
There seems to be a simple fix for this problem. The kabc plugin ldapkio within
kdepimlibs has a private AddresseeToLDIF and a data method that can be changed
to correctly handle several e-mail addresses in either one mail attribute or a
mail and mailAlias attribute. They reside in the source file
resourceldapkio.cpp.

In addition, the above mentioned methods and the init method can be adapted to
support additional LDAP attributes (country name, department, homepage url,
birthday, nickname).

For this purpose also the AttributesDialog constructor within the source file
resourceldapkioconfig.cpp has to be adapted in order to allow the user to
manage the new attributes. 

I've attached a patch to outline the required changes to the source code files. 

I've added several comments to the mail related part of the patch to provide
for a better understanding of the mail handling strategy. In principle, the new
code allows the user to store all mail addresses in either one mail or a mail
and a mailAlias attribute. In the latter case, the LDAP directory will contain
the preferred e-mail address in the mail attribute and all other mail addresses
in the mailAlias attribute. 

The attached patch includes also a default mapping for three LDAP attributes in
the outlook map, which is compatible to MS Outlook 2007.

I've tested this solution under Ubuntu karmic and it works fine. E-mail
addresses have been correctly read and stored in following cases:
- mail attribute only (all mail addresses, preferred is first)
- mailAlias attribute only (all mail addresses)
- Different mail and mailAlias attributes (preferred address in mail, rest in
mailAlias)
- Same attribute for mail and mailAlias (all mail addresses, preferred is
first)
The new attributes are correctly set and read in the LDAP directory.
Note: You need an additional LDAP schema for openldap in order to test this.
- Nickname, description and (home) street are correctly mapped to LDAP
attributes that are supported by Outlook 2007.

I have not identified further side-effects of this patch. But I recommend some
further testing.

Note: As the patch is against the original source code, it contains also the
patch for fixing the bug https://bugs.kde.org/show_bug.cgi?id=218353.
Withoutthis fix modification of LDAP directory based contacts is not possible.
Please consider this, when including this patch into the KDE source code
branche(s).

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list