mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-04 21:08:51 +00:00
oc: Fix internal EntryIds properties on multidomain
PidTag*EntryId properties were not being generated (which contain the email address and so on). Functionality on Outlook clients like "Reply All" were not working because of this (probably a lot more stuff related with email addresses). With multidomain support enabled outlook clients will use full email address (e.g. user@domain.com) as login. This change is needed because we were performing ldap queries on samdb using (sAMAccountName=UIDFieldName), being UIDFieldName the parameter configured in sogo.conf for that source. In multidomain environment this field could be `sAMAccountName` but it could not. Actually the more logical scenario will be to use `uid` field here (which will be just `user`, without the `@domain.com` part). SOGoUserManager will return `sAMAccountName` if the contact has it (in Outlook environment that means always) so it can (and must) be used to query samdb in MAPIStoreSamDBUtils properly. TL;DR: use sAMAccoutName instead of uid to query samdb
This commit is contained in:
@@ -803,7 +803,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||
contactInfos = [mgr contactInfosForUserWithUIDorEmail: email];
|
||||
if (contactInfos)
|
||||
{
|
||||
username = [contactInfos objectForKey: @"c_uid"];
|
||||
username = [contactInfos objectForKey: @"sAMAccountName"];
|
||||
samCtx = [[self context] connectionInfo]->sam_ctx;
|
||||
entryId = MAPIStoreInternalEntryId (samCtx, username);
|
||||
}
|
||||
@@ -1501,10 +1501,10 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||
if ([cn length] == 0)
|
||||
cn = email;
|
||||
contactInfos = [mgr contactInfosForUserWithUIDorEmail: email];
|
||||
|
||||
|
||||
if (contactInfos)
|
||||
{
|
||||
username = [contactInfos objectForKey: @"c_uid"];
|
||||
username = [contactInfos objectForKey: @"sAMAccountName"];
|
||||
recipient->username = [username asUnicodeInMemCtx: msgData];
|
||||
entryId = MAPIStoreInternalEntryId (samCtx, username);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user