Dependency Graph
View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000556 | SOGo | Backend General | public | 2010-04-09 13:05 | 2011-01-05 22:34 |
Reporter | cyberal77 | Assigned To | ludovic | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 1.2.1 | ||||
Target Version | 1.3.5 | Fixed in Version | 1.3.5 | ||
Summary | 0000556: Use the SQL field "mail" instead of "uid + MailDomain" | ||||
Description | maildomain as set to test.com I have a user where : In webmail or when SOGo send mail "Calandar creation" the mail for my user is sogo1test@test.com instead of mister.sogo@test.com. in my mail system sogo1test@test.com is Unknow. | ||||
Tags | No tags attached. | ||||
2010-04-09 13:20
|
patch_sql_mail.diff (3,165 bytes)
*** SOGo/SoObjects/SOGo/SOGoUserManager.m 2010-04-01 18:08:05.000000000 +0200 --- ../SOGo/SoObjects/SOGo/SOGoUserManager.m 2010-04-09 14:45:10.000000000 +0200 *************** *** 480,486 **** - (void) _fillContactMailRecords: (NSMutableDictionary *) contact { ! NSString *uid, *domain, *systemEmail; NSMutableArray *emails; SOGoDomainDefaults *dd; --- 480,486 ---- - (void) _fillContactMailRecords: (NSMutableDictionary *) contact { ! NSString *uid, *domain, *systemEmail, *mail; NSMutableArray *emails; SOGoDomainDefaults *dd; *************** *** 491,501 **** dd = [SOGoSystemDefaults sharedSystemDefaults]; emails = [contact objectForKey: @"emails"]; uid = [contact objectForKey: @"c_uid"]; ! if ([uid rangeOfString: @"@"].location == NSNotFound) systemEmail = [NSString stringWithFormat: @"%@@%@", uid, [dd mailDomain]]; else systemEmail = uid; [emails addObject: systemEmail]; [contact setObject: [emails objectAtIndex: 0] forKey: @"c_email"]; } --- 491,505 ---- dd = [SOGoSystemDefaults sharedSystemDefaults]; emails = [contact objectForKey: @"emails"]; uid = [contact objectForKey: @"c_uid"]; ! mail = [contact objectForKey: @"mail"]; ! if (mail != nil) ! systemEmail = mail; ! else if ([uid rangeOfString: @"@"].location == NSNotFound) systemEmail = [NSString stringWithFormat: @"%@@%@", uid, [dd mailDomain]]; else systemEmail = uid; + NSLog (@"EmailForContact: %@", mail); [emails addObject: systemEmail]; [contact setObject: [emails objectAtIndex: 0] forKey: @"c_email"]; } *************** *** 507,519 **** NSDictionary *userEntry; NSEnumerator *sogoSources; NSObject <SOGoDNSource> *currentSource; ! NSString *sourceID, *cn, *c_domain, *c_uid, *c_imaphostname; NSArray *c_emails; BOOL access; emails = [NSMutableArray array]; cn = nil; c_uid = nil; c_domain = nil; c_imaphostname = nil; --- 511,524 ---- NSDictionary *userEntry; NSEnumerator *sogoSources; NSObject <SOGoDNSource> *currentSource; ! NSString *sourceID, *cn, *c_domain, *c_uid, *c_email, *c_imaphostname; NSArray *c_emails; BOOL access; emails = [NSMutableArray array]; cn = nil; c_uid = nil; + c_email = nil; c_domain = nil; c_imaphostname = nil; *************** *** 534,539 **** --- 539,546 ---- cn = [userEntry objectForKey: @"c_cn"]; if (!c_uid) c_uid = [userEntry objectForKey: @"c_uid"]; + if (!c_email) + c_email = [userEntry objectForKey: @"mail"]; if (!c_domain) c_domain = [userEntry objectForKey: @"c_domain"]; c_emails = [userEntry objectForKey: @"c_emails"]; *************** *** 564,569 **** --- 571,578 ---- [currentUser setObject: emails forKey: @"emails"]; [currentUser setObject: cn forKey: @"cn"]; [currentUser setObject: c_uid forKey: @"c_uid"]; + if (c_email) + [currentUser setObject: c_email forKey: @"mail"]; [currentUser setObject: c_domain forKey: @"c_domain"]; // If our LDAP queries gave us nothing, we add at least one default |
I have attached a patch that works in SQL but I do not know if it works with LDAP. |
|
The change should not be in SOGoUserManager but it should rather be in SQLSource.m. Could you provide a new patch? |
|
"Demoted" while we wait for a new patch. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2010-04-09 13:05 | cyberal77 | New Issue | |
2010-04-09 13:20 | cyberal77 | File Added: patch_sql_mail.diff | |
2010-04-09 13:22 | cyberal77 | Note Added: 0000909 | |
2010-07-27 17:06 | ludovic | Status | new => assigned |
2010-07-27 17:06 | ludovic | Assigned To | => ludovic |
2010-07-27 17:06 | ludovic | Target Version | => 1.3.1 |
2010-08-03 16:11 | ludovic | Note Added: 0001270 | |
2010-08-03 16:19 | ludovic | Note Added: 0001271 | |
2010-08-03 16:19 | ludovic | Target Version | 1.3.1 => |
2010-12-29 19:57 | ludovic | Relationship added | has duplicate 0000888 |
2011-01-05 20:32 | ludovic | Target Version | => 1.3.5 |
2011-01-05 22:34 | ludovic | Note Added: 0002004 | |
2011-01-05 22:34 | ludovic | Status | assigned => resolved |
2011-01-05 22:34 | ludovic | Fixed in Version | => 1.3.5 |
2011-01-05 22:34 | ludovic | Resolution | open => fixed |