Hei Achim
Am Sonntag, 8. April 2012, 00.41:03 schrieb Achim: > Hello list (and first post): > > I followed the excellent tutorial > <http://trac.roundcube.net/wiki/Howto_Ldap> to successfully implement > successfully public and private address books: importing (via abxldap), > searching and browsing works "as advertised". > > Thank you for a great job so far :-) first, thanks for the "excellent" :-) > Next task was to use RC to edit the entries in both public and private > directories. Permissions are set accordingly in slapd.conf, and editing > works fine with iOS 5.0 and 5.1, and jxplorer. > > I enclose 5 specific (verbose) experiences with both 0.7.2 and 0.8-beta > that I would like to help address: I am runnng latest SVN, but I suppose 0.7+ works similar for ldap addressbook. ldap support in RC is far from good tested, since I just have my setup, and the core devs do not use it much... ...but you have to give us more information... here some tips: - can you show us your LDAP part in main.inc.php ? - I know that openLDAP needs sn and cn as mandatory fields! - in one log line bellow I found: > [07-Apr-2012 16:46:00 +0200]: C: Add [dn: > mail=new_cont...@example.com,ou=public,ou=rcabook,dc=hostname,dc=tld]: this seems that RC uses a wrong dn config here.... have you an idea why? - somewhere bellow I have seen > [postalcode] => Array maybe RC is converting the right "postalCode" to lower case, anyway, if you used somewhere lower case in config, LDAP is rececting that! - if you have an Object class violation, the openLDAP is rejecting the commit: can you please test your commits with command line tools like ldapadd ldapmodify, and ldapmodrdn ? the syntax looks like: ****adding minimum record*********************************** echo " dn: $new_dn objectClass: top objectClass: inetOrgPerson cn: Fullname sn: Surname " | ldapadd -x -H ldap://$server -D $bind_dn -w $bind_pass *****changing record****************************************** echo " dn: $old_dn changetype: modify replace: sn sn: Othername - add: mail mail: n...@mail.tdl " | ldapmodify -x -H ldap://$server -D $bind_dn -w $bind_pass ************************************************************** see the manuals in case of questions. If that works wirh your data as you expected and RC commit is rejected as you described bellow, we have to think deeper :-) Andreas > 1) Changing the cn, sn, givenname, o, and phone (mobile, home, work) > fields works and updates the contact as expected: the new input is > updated on the server, and existing data are preserved. However, an > "Object class violation" is raised: > > [07-Apr-2012 03:59:37 +0200]: C: Replace [dn: cn=John > Doe,ou=public,ou=rcabook,dc=hostname,dc=tld]: Array > ( > [cn] => John Doe > [sn] => Doe > [givenname] => John Doe > [o] => ORIG > ) > > [07-Apr-2012 03:59:37 +0200]: S: OK > [07-Apr-2012 03:59:37 +0200]: C: Rename [dn: cn=John > Doe,ou=public,ou=rcabook,dc=hostname,dc=tld] [dn: mail=j...@acme.com] > [07-Apr-2012 03:59:37 +0200]: S: Object class violation > [07-Apr-2012 03:59:37 +0200]: C: Read [dn: cn=John > Doe,ou=public,ou=rcabook,dc=hostname,dc=tld] [(objectclass=*)] > [07-Apr-2012 03:59:37 +0200]: S: OK > [07-Apr-2012 03:59:37 +0200]: C: Search > [(objectClass=groupOfNames)][dn: > ou=public,ou=rcabook,dc=hostname,dc=tld] > [07-Apr-2012 03:59:37 +0200]: S: 0 record(s) > [07-Apr-2012 03:59:37 +0200]: C: Close > > RESULT: Works OK, but we get a red error message "An error occured > while saving." on top of the web page. > > > > 2) Adding a new contact to LDAP also works (NO exception this time): > > [07-Apr-2012 16:45:59 +0200]: C: Connect [calendarserver:389] [Public] > [07-Apr-2012 16:46:00 +0200]: S: OK > [07-Apr-2012 16:46:00 +0200]: C: Bind [dn: > cn=u...@hostname.net,ou=private,ou=rcabook,dc=hostname,dc=tld] [pass: > XXXXXXXXXXXXX] > [07-Apr-2012 16:46:00 +0200]: S: OK > [07-Apr-2012 16:46:00 +0200]: C: Search > [(&(objectClass=inetOrgPerson)(|(mail=new_cont...@example.com)))][dn: > ou=public,ou=rcabook,dc=hostname,dc=tld] > [07-Apr-2012 16:46:00 +0200]: S: 0 record(s) > [07-Apr-2012 16:46:00 +0200]: C: Add [dn: > mail=new_cont...@example.com,ou=public,ou=rcabook,dc=hostname,dc=tld]: > Array > ( > [cn] => Last, First > [sn] => First > [givenname] => Last > [mail] => new_cont...@example.com > [objectClass] => Array > ( > [0] => top > [1] => inetOrgPerson > ) > > ) > > [07-Apr-2012 16:46:00 +0200]: S: OK > [07-Apr-2012 16:46:00 +0200]: C: Close > > > > 3) Adding an address does not work: > > [07-Apr-2012 21:29:43 +0200]: C: Replace [dn: > mail=new_cont...@example.com,ou=public,ou=rcabook,dc=hostname,dc=tld]: > Array > ( > [cn] => Last, First > [sn] => First > [givenname] => Last > [mail] => new_cont...@example.com > ) > > [07-Apr-2012 21:29:43 +0200]: S: OK > [07-Apr-2012 21:29:43 +0200]: C: Add [dn: > mail=new_cont...@example.com,ou=public,ou=rcabook,dc=hostname,dc=tld]: > Array > ( > [street] => Array > ( > [0] => street > ) > > [postalcode] => Array > ( > [0] => zip > ) > > [l] => Array > ( > [0] => place > ) > > [c] => Array > ( > [0] => country > ) > > ) > > [07-Apr-2012 21:29:43 +0200]: S: Object class violation > [07-Apr-2012 21:29:43 +0200]: C: Read [dn: > mail=new_cont...@example.com,ou=public,ou=rcabook,dc=hostname,dc=tld] > [(objectclass=*)] > [07-Apr-2012 21:29:43 +0200]: S: OK > [07-Apr-2012 21:29:43 +0200]: C: Search > [(objectClass=groupOfNames)][dn: > ou=public,ou=rcabook,dc=hostname,dc=tld] > [07-Apr-2012 21:29:43 +0200]: S: 0 record(s) > [07-Apr-2012 21:29:43 +0200]: C: Close > > In addition, I can see the following PHP error again: > > Warning: ldap_mod_add(): Modify: Object class violation in > program/include/rcube_ldap.php on line 1116 > > RESULT: Does NOT work, and we get a red error message "An error occured > while saving." on top of the web page. > > > > 4) Adding groups under the LDAP directory fails: > [07-Apr-2012 22:40:47 +0200]: C: Connect [calendarserver:389] [Private] > [07-Apr-2012 22:40:47 +0200]: S: OK > [07-Apr-2012 22:40:47 +0200]: C: Bind [dn: > cn=u...@hostname.net,ou=private,ou=rcabook,dc=hostname,dc=tld] [pass: > XXXXXXXXXXXXX] > [07-Apr-2012 22:40:47 +0200]: S: OK > [07-Apr-2012 22:40:47 +0200]: C: Add [dn: > cn=Testgroup,cn=u...@hostname.net,ou=private,ou=rcabook,dc=hostname,dc=tld]: > Array > ( > [objectClass] => Array > ( > [0] => top > [1] => groupOfNames > ) > > [cn] => Testgroup > [] => > ) > > [07-Apr-2012 22:40:47 +0200]: S: Undefined attribute type > [07-Apr-2012 22:40:47 +0200]: C: Close > > RESULT: Does NOT work, and we get a red error message "An error occured > while saving." on top of the web page. > > In addition, the input mask for "Adress" shows 4 text boxes (street, > postal, l, c fields), but the one for Region (st field) only shows a > placeholder string "{region}" (no text box, just the text). > > > > 5) Contact photos that show fine in iOS and jxplorer don't show at all > in the web UI. No need to be able to update the photo here, but showing > the already existing contact photo would be awesome ;-) > > > > > Could you please indicate whether these are know issues, and what to do > about them? Again, editing etc. in iOS and jxplorer on the same LDAP > directory with the same credentials works correctly in all of the above > cases. > > Thank you in advance, Achim > _______________________________________________ > Roundcube Users mailing list > users@lists.roundcube.net > http://lists.roundcube.net/mailman/listinfo/users _______________________________________________ Roundcube Users mailing list users@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/users