Hello Alec:

On 12.04.2012 13:53, A.L.E.C wrote:
On 12.04.2012 12:33, A.L.E.C wrote:
The problem is with 'required_fields' in addressbook config. Also when
handling VCARD data FN is mapped to displayname.

Maybe we can modify rcube_ldap::validate() to fill 'name' with
displayname, if it's empty but 'displayname' exists. I'm not sure if
it's all, this can be config dependent.

My mistake, FN => 'displayname' => 'name'. So the problem is different. On import rcube_ldap::validate() with autofix argument enabled is not
called. Maybe we just should use it before import().

r6067 should fix this issue. The problem was also with
EMAIL;type=INTERNET which is recognized as email:other.

So I assume that this also solves the following situation (which I am also going to test with f3isar's configuration):

I exported a single contact from SQL like this:

BEGIN:VCARD
VERSION:3.0
N:Last;First;;;
FN:First Last
EMAIL;type=INTERNET;type=WORK:[email protected]
EMAIL;type=INTERNET:[email protected]
TEL;type=MOBILE:1234
URL:http://acme.com
ADR:;;Park Av 100;NY;;12345;
ORG:Org
END:VCARD

Importing back into an *SQL* addressbooks works as expected, all fields are read and populated.

Importing the same record back into an LDAP directory, some values are imported:

* FN
* N
* EMAIL work
* Mobile

but several others are not (see below for logs):

* Email other (might be a inetOrgPerson restriction, there is only 1 email field in my fieldmap)
* Address other
* URL other

Extract of my fieldmap:
    'email:work'  => 'mail',
    'website' => 'labeledURI',
    'street'      => 'street',
    'zipcode'     => 'postalCode',
    'locality'    => 'l',
    'region'      => 'st',

I am aware that this is probably due to a mapping issue (or rather restricton), but could somebody point out what to change?

This functionality is fundamental for migrating private SQL address books to LDAP, any help would be appreciated.

Thanks, Achim

Extract from logs/ldap

[12-Apr-2012 14:03:15 +0200]: C: Add [dn: cn=First Last,[email protected],ou=private,ou=rcabook,dc=domain,dc=tld]: Array
(
        [cn] => First Last
        [sn] => Last
        [givenname] => First
        [mail] => Array
                (
                        [0] => [email protected]
                )

        [mobile] => Array
        (
            [0] => 1234
        )

    [o] => Org
    [objectClass] => Array
        (
            [0] => top
            [1] => inetOrgPerson
        )

)

[12-Apr-2012 14:03:15 +0200]: S: OK
[12-Apr-2012 14:03:15 +0200]: C: Close
_______________________________________________
Roundcube Users mailing list
[email protected]
http://lists.roundcube.net/mailman/listinfo/users

Reply via email to