merge of '62e33503bd06b9731084aa5fc492080cd0b5dcd4'
and '8869aacc55c49a49f77e9f056912a8ff12222283' Monotone-Parent: 62e33503bd06b9731084aa5fc492080cd0b5dcd4 Monotone-Parent: 8869aacc55c49a49f77e9f056912a8ff12222283 Monotone-Revision: ab0d6aa948262973d1cb1c1b5c2028965a306451 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-12-18T01:59:14maint-2.0.2
commit
90a5c9ee21
|
@ -1,3 +1,9 @@
|
|||
2011-12-15 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoSieveManager.m - slightly reworked
|
||||
the code to use NSURL in order to instanciate the SOPE
|
||||
Sieve code - that permits using TLS.
|
||||
|
||||
2011-12-14 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/ContactsUI.js (getMenus): register the
|
||||
|
|
Binary file not shown.
|
@ -622,12 +622,13 @@ static NSString *sieveScriptName = @"sogo";
|
|||
{
|
||||
NSMutableArray *req;
|
||||
NSMutableString *script, *header;
|
||||
NGInternetSocketAddress *address;
|
||||
NSDictionary *result, *values;
|
||||
SOGoUserDefaults *ud;
|
||||
SOGoDomainDefaults *dd;
|
||||
NGSieveClient *client;
|
||||
NSString *filterScript, *v, *sieveServer;
|
||||
NSURL *url;
|
||||
|
||||
int sievePort;
|
||||
BOOL b, connected;
|
||||
|
||||
|
@ -744,19 +745,20 @@ static NSString *sieveScriptName = @"sogo";
|
|||
//
|
||||
// sieve://localhost
|
||||
// sieve://localhost:2000
|
||||
// sieve://localhost:2000/?tls=YES
|
||||
//
|
||||
// Values such as "localhost" or "localhost:2000" are NOT supported.
|
||||
//
|
||||
sieveServer = [dd sieveServer];
|
||||
sievePort = 2000;
|
||||
url = nil;
|
||||
|
||||
if (!sieveServer)
|
||||
{
|
||||
NSString *s;
|
||||
|
||||
sieveServer = @"localhost";
|
||||
|
||||
s = [dd imapServer];
|
||||
|
||||
|
||||
if (s)
|
||||
{
|
||||
NSURL *url;
|
||||
|
@ -768,26 +770,20 @@ static NSString *sieveScriptName = @"sogo";
|
|||
else
|
||||
sieveServer = s;
|
||||
}
|
||||
else
|
||||
sieveServer = @"localhost";
|
||||
|
||||
url = [NSURL URLWithString: [NSString stringWithFormat: @"%@:%d", sieveServer, sievePort]];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSURL *url;
|
||||
|
||||
url = [NSURL URLWithString: sieveServer];
|
||||
|
||||
if ([url host])
|
||||
sieveServer = [url host];
|
||||
|
||||
if ([[url port] intValue] != 0)
|
||||
sievePort = [[url port] intValue];
|
||||
}
|
||||
|
||||
address = [NGInternetSocketAddress addressWithPort: sievePort onHost: sieveServer];
|
||||
|
||||
client = [NGSieveClient clientWithAddress: address];
|
||||
client = [[NGSieveClient alloc] initWithURL: url];
|
||||
|
||||
if (!client) {
|
||||
NSLog(@"Sieve connection failed on %@", [address description]);
|
||||
NSLog(@"Sieve connection failed on %@", [url description]);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
@ -808,7 +804,7 @@ static NSString *sieveScriptName = @"sogo";
|
|||
|
||||
if (!connected)
|
||||
{
|
||||
NSLog(@"Sieve connection failed on %@", [address description]);
|
||||
NSLog(@"Sieve connection failed on %@", [url description]);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue