On 12/17/2012 10:03 PM, Martin Krpata wrote:
Hello,
ldap filter written to settings with command "defaults write sogod
..." and regex * (for example *filter = "mail='*'"*) does not work. It
will delete comma and result in error in logs and not working ldap
search filter...
Example:
when i use under sogo user:
1)
defaults write sogod SOGoUserSources '( { KindFieldName = kind;
MultipleBookingsFieldName = multiple_bookings; canAuthenticate = YES;
displayName = "Uzivatele emailu"; id = users; isAddressBook = YES;
type = sql; userPasswordAlgorithm = md5; viewURL =
"mysql://sogo:PASSWORD@127.0.0.1:3306/sogo/sogo_users"; },{ type =
ldap; CNFieldName = cn; IDFieldName = cn; UIDFieldName =
sAMAccountName; baseDN = "DC=OU-NEM,DC=CZ"; bindDN = "s...@ou-nem.cz";
bindFields = (sAMAccountName); SearchFieldNames = ( sn, displayName,
department ); bindPassword = PASSWORD; canAuthenticate = NO;
displayName = "Active Directory"; hostname = 192.168.89.244; id =
directory; isAddressBook = YES; port = 389; scope = SUB; *filter = "
objectClass = 'user' AND mail = '*' "*; } )'
2)
defaults read
...
filter = " objectClass = user AND *mail = * *";
...
3)
Search from sogo webmail (sogo.log):
2012-12-17 13:32:28.152 sogod[2571] WARNING(+[EOQualifier(Parsing)
qualifierWithQualifierFormat:]): unexpected chars at the end of the
string(class=GSMutableString,len=143) '(sn='martin*') OR
(displayName='martin*') OR (department='martin*') OR (mail='martin*')
OR (cn='martin*') AND objectClass = user AND mail = * '
4)
Resolution:
edit manualy /home/sogo/GNUstep/Defaults/.GNUstepDefaults
whitch i think is not recommanded...
from this
<string> objectClass = user AND mail = * </string>
to this
<string> objectClass = user AND *mail = '*'* </string>
5)
defaults read after edited .GNUstepDefaults and restarted sogo:
...
filter = " objectClass = user AND *mail = ''*''* ";
...
It is a bug in "defaults write" or am I doing something wrong?
regards,
Martin
/sorry for my english/
Hi Martin,
I submitted a bug report about a possibly related issue
(http://www.sogo.nu/bugs/view.php?id=2055). It sounds like the same
problem. It would be nice if the filters worked, then I can make use of
SOGoUserSources for address books.
Simon
--
htholidays.com
--
users@sogo.nu
https://inverse.ca/sogo/lists