diff --git a/NEWS b/NEWS index 2a276dbea..428ae0ae2 100644 --- a/NEWS +++ b/NEWS @@ -4,9 +4,10 @@ New features - print gridlines of calendar in 15-minute intervals - allow the events/tasks lists to be collapsable - + Enhancements - bubble box of events no longer overlaps the current event + - now pass the x-originating-ip using the IMAP ID extension Bug fixes - properly handle RFC2231 everywhere diff --git a/SoObjects/Mailer/SOGoMailBaseObject.m b/SoObjects/Mailer/SOGoMailBaseObject.m index 7053b19f7..62f3da511 100644 --- a/SoObjects/Mailer/SOGoMailBaseObject.m +++ b/SoObjects/Mailer/SOGoMailBaseObject.m @@ -151,6 +151,22 @@ static BOOL debugOn = YES; newConnection = (NGImap4Connection *) [NSNull null]; [self errorWithFormat:@"Could not connect IMAP4"]; } + else + { + // If the server has the ID capability (RFC 2971), we set the x-originating-ip + // accordingly for the IMAP connection. + NSString *remoteHost; + + remoteHost = [[context request] headerForKey: @"x-webobjects-remote-host"]; + + if (remoteHost) + { + if ([[[[newConnection client] capability] objectForKey: @"capability"] containsObject: @"id"]) + { + [[newConnection client] processCommand: [NSString stringWithFormat: @"ID (\"x-originating-ip\" \"%@\")", remoteHost]]; + } + } + } return newConnection; }