From 73cc81c71f8a496ec0aa11d70439a0ce29aa8faa Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 17 Oct 2016 11:40:17 -0400 Subject: [PATCH] (fix) only consider SMTP proxyAddresses for AD (fixes #3842) --- SoObjects/SOGo/LDAPSource.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SoObjects/SOGo/LDAPSource.m b/SoObjects/SOGo/LDAPSource.m index 647a3766e..9c2d78702 100644 --- a/SoObjects/SOGo/LDAPSource.m +++ b/SoObjects/SOGo/LDAPSource.m @@ -926,9 +926,12 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses { ldapValue = [allValues objectAtIndex: i]; r = [ldapValue rangeOfString: @":"]; + if (r.length) { - [emails addObject: [ldapValue substringFromIndex: r.location+1]]; + // We only keep "smtp" ones + if ([[ldapValue lowercaseString] hasPrefix: @"smtp"]) + [emails addObject: [ldapValue substringFromIndex: r.location+1]]; } else [emails addObject: ldapValue];