merge of '45cd2efd0294a222d0cee6d22da7a39ebdc6c8fa'

and 'a9b4a2aae19f072168fdfc23b91ebc443e0d55c4'

Monotone-Parent: 45cd2efd0294a222d0cee6d22da7a39ebdc6c8fa
Monotone-Parent: a9b4a2aae19f072168fdfc23b91ebc443e0d55c4
Monotone-Revision: d66ed2c7cc398b54500e14cb09c879bbd7915f0a

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-11-03T13:24:31
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau 2010-11-03 13:24:31 +00:00
commit 63ec8ebc12
6 changed files with 43 additions and 5 deletions

View file

@ -1,3 +1,7 @@
2010-11-02 Ludovic Marcotte <lmarcotte@inverse.ca>
* Implemented http://sogo.nu/bugs/view.php?id=821
2010-11-02 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/NSDictionary+BSJSONAdditions.[hm]:

View file

@ -236,8 +236,9 @@ static NSString *sieveScriptName = @"sogo";
SOGoUserDefaults *ud;
SOGoDomainDefaults *dd;
NGSieveClient *client;
NSString *filterScript, *v, *password;
NSString *filterScript, *v, *password, *sieveServer;
SOGoSieveConverter *converter;
int sievePort;
BOOL b;
dd = [[context activeUser] domainDefaults];
@ -338,9 +339,36 @@ static NSString *sieveScriptName = @"sogo";
[script insertString: header atIndex: 0];
}
// We connect to our Sieve server and upload the script
address = [NGInternetSocketAddress addressWithPort: 2000
onHost: [[self imap4URL] host]];
// We connect to our Sieve server and upload the script.
//
// sieveServer might have the following format:
//
// sieve://localhost
// sieve://localhost:2000
//
// Values such as "localhost" or "localhost:2000" are NOT supported.
//
sieveServer = [dd sieveServer];
sievePort = 2000;
if (!sieveServer)
{
sieveServer = @"localhost";
}
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];

View file

@ -41,6 +41,7 @@
- (NSString *) mailDomain;
- (NSString *) imapServer;
- (NSString *) sieveServer;
- (NSString *) imapAclStyle;
- (NSString *) imapFolderSeparator;
- (BOOL) imapAclConformsToIMAPExt;

View file

@ -113,6 +113,11 @@
return [self stringForKey: @"SOGoIMAPServer"];
}
- (NSString *) sieveServer
{
return [self stringForKey: @"SOGoSieveServer"];
}
#warning should be removed when we make use of imap namespace
- (NSString *) imapAclStyle
{

View file

@ -1,6 +1,6 @@
/* UIxMailPartHTMLViewer.m - this file is part of SOGo
*
* Copyright (C) 2007-2009 Inverse inc.
* Copyright (C) 2007-2010 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*