See ChangeLog

Monotone-Parent: e58b519a51a061b80853202ec91f07ec470a2bf0
Monotone-Revision: 3c0c68cb2927ba4cada8bdac6741f149c6007b52

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2011-12-15T19:37:02
This commit is contained in:
Ludovic Marcotte
2011-12-15 19:37:02 +00:00
parent 494d60cc17
commit 75c57a4285
2 changed files with 19 additions and 17 deletions
+6
View File
@@ -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
+13 -17
View File
@@ -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;
}