See ChangeLog

Monotone-Parent: 398d5b0c3ce7ef971f2aa9111d0c4c5da3cba021
Monotone-Revision: 45563a5428bd14a897f31d8c32c9bec7cafb0e73

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2010-08-25T13:09:25
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2010-08-25 13:09:25 +00:00
parent ccd69d3f88
commit d79565bc90
6 changed files with 56 additions and 11 deletions
+7
View File
@@ -1,3 +1,10 @@
2010-08-25 Ludovic Marcotte <lmarcotte@inverse.ca>
* It's now possible to use SSL or TLS for the
SOGoIMAPServer value. Also updated the documentation
to give samples. Fixed the "port" value save from
the preferences module.
2010-08-24 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/WebServerResources/generic.js: (log): added a hack to enable
Binary file not shown.
+7 -8
View File
@@ -521,18 +521,17 @@ static NSString *sieveScriptName = @"sogo";
mailAccount = [self _mailAccount];
encryption = [mailAccount objectForKey: @"encryption"];
defaultPort = [[mailAccount objectForKey: @"port"] intValue];
if ([encryption isEqualToString: @"ssl"])
{
if (!defaultPort)
defaultPort = 143;
if ([encryption isEqualToString: @"ssl"] ||
[encryption isEqualToString: @"tls"])
protocol = @"imaps";
defaultPort = 993;
}
else
{
protocol = @"imap";
defaultPort = 143;
}
username = [mailAccount objectForKey: @"userName"];
escUsername
= [[username stringByEscapingURL] stringByReplacingString: @"@"
+40 -1
View File
@@ -502,10 +502,11 @@
- (void) _appendSystemMailAccount
{
NSString *fullName, *imapLogin, *imapServer, *signature, *encryption, *port, *scheme;
NSMutableDictionary *mailAccount, *identity, *mailboxes;
NSMutableArray *identities;
NSString *fullName, *imapLogin, *imapServer, *signature;
NSArray *mails;
NSURL *url;
unsigned int count, max;
mailAccount = [NSMutableDictionary new];
@@ -516,8 +517,46 @@
if (!imapServer)
imapServer = [[self domainDefaults] imapServer];
// imapServer might have the following format
// localhost
// localhost:143
// imap://localhost
// imap://localhost:143
// imaps://localhost:993
// imaps://localhost:143/?tls=YES
// imaps://localhost/?tls=YES
url = [NSURL URLWithString: imapServer];
scheme = [url scheme];
port = [url port];
encryption = @"none";
port = @"143";
if ([url query] && [[url query] caseInsensitiveCompare: @"tls=YES"] == NSOrderedSame)
encryption = @"tls";
if ([port intValue] == 0)
{
if (scheme)
{
if ([scheme caseInsensitiveCompare: @"imaps"] == NSOrderedSame &&
![encryption isEqualToString: @"tls"])
{
encryption = @"ssl";
port = @"993";
}
}
}
if ([url host])
imapServer = [url host];
[mailAccount setObject: imapLogin forKey: @"userName"];
[mailAccount setObject: imapServer forKey: @"serverName"];
[mailAccount setObject: port forKey: @"port"];
[mailAccount setObject: encryption forKey: @"encryption"];
identities = [NSMutableArray new];
mails = [self allEmails];
+1 -1
View File
@@ -1,6 +1,6 @@
/* SOGoUserDefaults.m - this file is part of SOGo
*
* Copyright (C) 2009 Inverse inc.
* Copyright (C) 2009-2010 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
+1 -1
View File
@@ -1162,7 +1162,7 @@
{
knownKeys = [NSArray arrayWithObjects: @"name", @"serverName",
@"userName", @"password", @"encryption",
@"identities", @"mailboxes", nil];
@"identities", @"mailboxes", @"port", nil];
[knownKeys retain];
}