View Issue Details

IDProjectCategoryView StatusLast Update
0004101SOGoBackend Address Bookpublic2017-03-24 11:12
Reportermzeedijk Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platform[Server] LinuxOSUbuntuOS Version14.04 LTS
Product Version3.2.7 
Summary0004101: Global Addresbook fields not used
Description

The additional fields in my SQL auth table are not visible in any client that I use: Web and Thunderbird.

According to : https://sogo.nu/files/docs/SOGoInstallationGuide.html#_authentication_using_sql
it is stated that: "Other columns can exist and will actually be mapped automatically if they have the same name as popular LDAP attributes (such as givenName, sn, department, title, telephoneNumber, etc.)."

I have some extra columns, but in all above mentioned clients I can only see some of the required fields and some additional columns.

Steps To Reproduce

Query any of the contacts on the global addressbook.
Thunderbird with sogo plugins only shows c_uid or c_name (which in my case is the same) in the Name column and mail in the Email column.
The SOGo webinterface does actually show a fullname and email address but none of the other fields.

Additional Information

Table definition:
-- Table: sogo_auth

-- DROP TABLE sogo_auth;

CREATE TABLE sogo_auth
(
c_uid character varying NOT NULL,
c_name character varying,
c_password character varying,
c_cn character varying,
mail character varying,
"givenName" character varying,
sn character varying,
department character varying,
title character varying,
initials character varying,
"displayName" character varying,
description character varying,
"telephoneNumber" character varying,
"otherTelephone" character varying,
url character varying,
mobile character varying,
"Company" character varying,
"streetAddress" character varying,
c character varying,
"postalCode" character varying,
st character varying,
CONSTRAINT sogo_auth_pkey PRIMARY KEY (c_uid),
CONSTRAINT sogo_auth_c_name_key UNIQUE (c_name)
)
WITH (
OIDS=FALSE
);
ALTER TABLE sogo_auth
OWNER TO sogo;


In sogo.conf I have

SOGoUserSources =
(
{
type = sql;
id = directory;
viewURL = "postgresql://sogo:sogo@localhost:5432/sogo/sogo_auth";
canAuthenticate = YES;
isAddressBook = YES;
userPasswordAlgorithm = sha512-crypt;
displayName = "Employees";
}
);

In the postgresql logfile I see the query which retrieves every field:
SELECT * FROM sogo_auth WHERE (LOWER(c_cn) LIKE '%.%' OR LOWER(mail) LIKE '%.%')

TagsNo tags attached.

Activities

mzeedijk

mzeedijk

2017-03-22 13:09

reporter   ~0011556

It looks like the result from postgresql is not showing contents from columns with columnnames that contain uppercase characters. Could this be the case?

francis

francis

2017-03-23 16:01

administrator   ~0011564

Lower case your column names.

mzeedijk

mzeedijk

2017-03-24 11:12

reporter   ~0011575

This is correct. After lowering the case of the columnnames it works. I tested this before, but apparently there are different fieldsnames possible. I tried it on streetAddress, which should be spelled street in order to work. Maybe publish a list or standard of usable fieldnames (and thus columnnames)?

Issue History

Date Modified Username Field Change
2017-03-22 10:53 mzeedijk New Issue
2017-03-22 13:09 mzeedijk Note Added: 0011556
2017-03-23 16:01 francis Note Added: 0011564
2017-03-24 11:12 mzeedijk Note Added: 0011575