Project

General

Profile

Problem mit standard exclude Filter für private Faxnummer

Added by Ralf Bauer 3 months ago

Hallo Zusammen!

Ich habe im Adressbuch meiner Nextcloud diverse Kontakte, für die sowohl eine private als auch eine geschäftliche Faxnummer hinterlegt ist. Wenn ich diese per l2cpbg zur Verfügung stelle, so wird die private Faxnummer zusätzlich als private Telefonnummer ("homePhone") abgespeichert / gefunden.

Beispiel Kontakt Export aus Nextcloud (28.0.1):

BEGIN:VCARD
VERSION:4.0
N:Nachname;Simone;;;
FN:Simone Nachname
TEL;TYPE=HOME;VALUE=UNKNOWN:09999 972121
TEL;TYPE=HOME,FAX;VALUE=UNKNOWN:09999 972123
TEL;TYPE=WORK,VOICE:09999 972122
TEL;TYPE=WORK,FAX:09999 972058
EMAIL;TYPE=HOME:simone.nachname@t-online.de
ADR;TYPE=HOME:;;Strasse 1;Ort;;99999;
UID:fbd7633a-96cb-4829-b777-af2e38bfbe66
REV;VALUE=DATE-AND-OR-TIME:20231231T143335Z
END:VCARD

Die Konfiguration für "homePhone" habe ich in der l2cpbg.conf nicht geändert.

Auszug aus l2cpbg.conf:

#[ldap.map.homePhone]                                                                      
#dav = "TEL"                                                                               
#itypes = "^(home|privat)"                                                                 
#etypes = "^(home|privat).*(fax)$|^(fax)(home|privat)"                                     
#                                            

Ich hatte erwartet, dass durch den "etypes" Filter die Fax Nummer nicht als "homePhone" abgespeichert / gefunden wird. Aber eventuell habe ich das auch falsch verstanden.

Die zugehörigen Log Einträge für das Einlesen des Beispiel Kontakts durch l2cpbg sehen wie folgt aus:

12:34:35 [INF] LDAP-2-CardDAV (1 way read) Phone Book Gateway version 0.9.7 @ linux-openrc
12:34:35 [INF] Loaded config '/app/config/l2cpbg.conf'
12:34:35 [TRC] [config] GetDavServers()
12:34:35 [TRC] [config] buildLdapMap()
12:34:35 [DBG] [config] ldapAttributes []string{"c", "cn", "company", "department", "facsimileTelephoneNumber", "givenName", "homeCity", "homeCountry", "homeMail", "homePhone", "homePostalCode", "homeState", "homeStreet", "l", "mail", "middleName", "mobile", "personalTitle", "postalAddress", "postalCode", "sn", "st", "street", "telephoneNumber", "title"}
12:34:35 [TRC] [config] Preparing LdapMap for 'ldap.map.c' entries...
...
company=ORG|||0
department=ORG|||1
facsimileTelephoneNumber=TEL|(?i)(fax)||0
givenName=FN|||0
homeCity=ADR|(?i)^(home|privat)|(?i)^(arbeit|other|work)|3
homeCountry=ADR|(?i)^(home|privat)|(?i)^(arbeit|other|work)|6
homeMail=EMAIL|(?i)(home|privat)|(?i)^(arbeit|other|work)|0
homePhone=TEL|(?i)^(home|privat)|(?i)^(home|privat).*(fax)$|^(fax)(home|privat)|0
homePostalCode=ADR|(?i)^(home|privat)|(?i)^(arbeit|other|work)|5
homeState=ADR|(?i)^(home|privat)|(?i)^(home|privat).*(fax)$|^(fax)(home|privat)|4
homeStreet=ADR|(?i)^(home|privat)|(?i)^(arbeit|other|work)|2
3
mail=EMAIL|(?i)^(arbeit|work)|(?i)^(home|other|privat)|0
middleName=N|||2
mobile=TEL|(?i)(cell|car|mobil)||0
personalTitle=N|||3
postalAddress=ADR|||3
postalCode=ADR|||5
sn=N|||0
st=ADR|||4
street=ADR|||2
telephoneNumber=TEL||(?i)^(cell|car|home|fax|mobil|privat)|0
title=TITLE|||0')
12:34:35 [INF] [server] Haven't found DB key 'cldapStructure', assuming new DB...
...
12:34:59 [TRC] [config] GetDavServers()
12:34:59 [TRC] [ card ] EncodeCardId(card.CardId{Uid:"fbd7633a-96cb-4829-b777-af2e38bfbe66", Ou:"Contacts (Sabine)"})
12:34:59 [TRC] [ card ] mergeAppleAddressBookExtensionToType()
12:34:59 [TRC] [  db  ] SetTxn('lhomeStreet.strasse 1.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).homeStreet.strasse 1.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [ util ] InternationalPhonenum('09999 972122')
12:34:59 [TRC] [ util ] harmonizePhonenum('09999 972122')
12:34:59 [TRC] [ util ] E164 formatted: +499999972122
12:34:59 [TRC] [ util ] Converted phone number '09999 972122' to E.164 format '+499999972122'
12:34:59 [TRC] [  db  ] SetTxn('e+499999972122.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('EContacts (Sabine).+499999972122.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('ltelephoneNumber.09999 972122.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).telephoneNumber.09999 972122.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [ util ] PrettifyPhonenum('+499999972122')
12:34:59 [DBG] [ util ] Prettified phone number '+499999972122' to '972122'
12:34:59 [TRC] [  db  ] SetTxn('lcn.simone nachname.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).cn.simone nachname.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('lgivenName.simone nachname.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).givenName.simone nachname.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('lpostalCode.99999.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).postalCode.99999.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('lsn.nachname.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).sn.nachname.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('lhomePostalCode.99999.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).homePostalCode.99999.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('lpostalAddress.ort.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).postalAddress.ort.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [ util ] InternationalPhonenum('09999 972123')
12:34:59 [TRC] [ util ] harmonizePhonenum('09999 972123')
12:34:59 [TRC] [ util ] E164 formatted: +499999972123
12:34:59 [TRC] [ util ] Converted phone number '09999 972123' to E.164 format '+499999972123'
12:34:59 [TRC] [  db  ] SetTxn('e+499999972123.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('EContacts (Sabine).+499999972123.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('lfacsimileTelephoneNumber.09999 972123.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).facsimileTelephoneNumber.09999 972123.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [ util ] PrettifyPhonenum('+499999972123')
12:34:59 [DBG] [ util ] Prettified phone number '+499999972123' to '972123'
12:34:59 [TRC] [ util ] InternationalPhonenum('09999 972058')
12:34:59 [TRC] [ util ] harmonizePhonenum('09999 972058')
12:34:59 [TRC] [ util ] E164 formatted: +499999972058
12:34:59 [TRC] [ util ] Converted phone number '09999 972058' to E.164 format '+499999972058'
12:34:59 [TRC] [  db  ] SetTxn('e+499999972058.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('EContacts (Sabine).+499999972058.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('lfacsimileTelephoneNumber.09999 972058.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).facsimileTelephoneNumber.09999 972058.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [ util ] PrettifyPhonenum('+499999972058')
12:34:59 [DBG] [ util ] Prettified phone number '+499999972058' to '972058'
12:34:59 [TRC] [  db  ] SetTxn('lhomeCity.ort.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).homeCity.ort.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('lhomeMail.simone.nachname@t-online.de.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).homeMail.simone.nachname@t-online.de.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('lstreet.strasse 1.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).street.strasse 1.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [ util ] InternationalPhonenum('09999 972121')
12:34:59 [TRC] [ util ] harmonizePhonenum('09999 972121')
12:34:59 [TRC] [ util ] E164 formatted: +499999972121
12:34:59 [TRC] [ util ] Converted phone number '09999 972121' to E.164 format '+499999972121'
12:34:59 [TRC] [  db  ] SetTxn('e+499999972121.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('EContacts (Sabine).+499999972121.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('lhomePhone.09999 972121.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).homePhone.09999 972121.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [ util ] PrettifyPhonenum('+499999972121')
12:34:59 [DBG] [ util ] Prettified phone number '+499999972121' to '972121'
12:34:59 [TRC] [ util ] InternationalPhonenum('09999 972123')
12:34:59 [TRC] [ util ] harmonizePhonenum('09999 972123')
12:34:59 [TRC] [ util ] E164 formatted: +499999972123
12:34:59 [TRC] [ util ] Converted phone number '09999 972123' to E.164 format '+499999972123'
12:34:59 [TRC] [  db  ] SetTxn('e+499999972123.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('EContacts (Sabine).+499999972123.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('lhomePhone.09999 972123.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).homePhone.09999 972123.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [ util ] PrettifyPhonenum('+499999972123')
12:34:59 [DBG] [ util ] Prettified phone number '+499999972123' to '972123'
12:34:59 [TRC] [  db  ] SetTxn('ll.ort.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('mContacts (Sabine).l.ort.fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [  db  ] SetTxn('LContacts (Sabine).fbd7633a-96cb-4829-b777-af2e38bfbe66', ...)
12:34:59 [TRC] [ card ] EncodeCardId(card.CardId{Uid:"fbd7633a-96cb-4829-b777-af2e38bfbe66", Ou:"Contacts (Sabine)"})

Wenn ich nach dem Beispiel Kontakt suche, erhalte ich zwei "homePhone" Treffer, einmal für 09999 972121 und den Zweiten für 09999 972123. Erwartet hätte ich, dass nur 09999 972121 geliefert wird, da 09999 972123 über die "etypes" RegEx von "homePhone" unterdrückt wird.

Über eine kurze Antwort oder Ideen zur Änderung des Verhaltens würde ich mich sehr freuen.

Mit freundlichen Grüßen,
Ralf


Replies (4)

RE: Problem mit standard exclude Filter für private Faxnummer - Added by Jörg Ebeling 3 months ago

Hallo Ralf!

Danke für den ausführlichen Report!

Du hast alles genau richtig verstanden.
Zumindest insoweit wie ich es in Erinnerung... naja und auch programmiert habe ;-)

Kann demnach nur ein Bug sein, oder irgendeine Einschränkung die ich gerade nicht sehe.

Dank Deines ausführlichen Reportes sollte ich das allerdings gut testen und debuggen können.

Ich hab 'n Ticket #73 angelegt und hoffe es bis Ende der Woche genauer untersucht oder gefixt zu haben.
Welche Architektur benutzt Du? Debian x64? (Nur wg. einer evtl. beta version zum testen)

RE: Problem mit standard exclude Filter für private Faxnummer - Added by Ralf Bauer 3 months ago

Hallo Jörg,

Danke für die schnelle Rückmeldung. Ich habe das Ganze in einem Alpine Linux Docker Container am laufen und verwende die l2cpbg_0.9.7_linux-amd64.tgz Version.

Liebe Grüße,
Ralf

RE: Problem mit standard exclude Filter für private Faxnummer - Added by Jörg Ebeling 3 months ago

Okay, sollte gefixt sein. Release und Infos sind im Ticket #73.

Bitte bei Gelegenheit testen und reporten ;-)

RE: Problem mit standard exclude Filter für private Faxnummer - Added by Ralf Bauer 3 months ago

Hallo Jörg,

habe es gerade eingespielt und getestet. Der Fehler ist weg, die Suche funktioniert nun wie gewünscht. Vielen Dank für deine schnelle Hilfe und die Bereitstellung der aktualisierten Version.

Liebe Grüße,
Ralf

    (1-4/4)
    Go to top