mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-09 10:25:08 +00:00
applied changes from 92cceaf860bbf56d983063471093858a3871ec23
through e38c570559610854b85c2c517053417779a76964
applied changes from e38c570559610854b85c2c517053417779a76964
through 9d44b483787d6b5bf34a75581975d592ab901570
applied changes from 9d44b483787d6b5bf34a75581975d592ab901570
through 6ec97f8aa3c0da79e5ef04809f3d7fce566e64b3
Monotone-Parent: 00afe1e795cd37cafff7687d6f1b8502f4f5735e
Monotone-Revision: 82564e2898976a6c09a85817e4b2954a5c58b7a9
Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2011-11-17T19:16:46
This commit is contained in:
@@ -629,7 +629,7 @@ static NSString *sieveScriptName = @"sogo";
|
||||
NGSieveClient *client;
|
||||
NSString *filterScript, *v, *sieveServer;
|
||||
int sievePort;
|
||||
BOOL b;
|
||||
BOOL b, connected;
|
||||
|
||||
dd = [user domainDefaults];
|
||||
if (!([dd sieveScriptsEnabled] || [dd vacationEnabled] || [dd forwardEnabled]))
|
||||
@@ -637,6 +637,8 @@ static NSString *sieveScriptName = @"sogo";
|
||||
|
||||
req = [NSMutableArray arrayWithCapacity: 15];
|
||||
ud = [user userDefaults];
|
||||
|
||||
connected = YES;
|
||||
b = NO;
|
||||
|
||||
script = [NSMutableString string];
|
||||
@@ -793,7 +795,23 @@ static NSString *sieveScriptName = @"sogo";
|
||||
[client closeConnection];
|
||||
return NO;
|
||||
}
|
||||
result = [client login: theLogin authname: theAuthName password: thePassword];
|
||||
|
||||
NS_DURING
|
||||
{
|
||||
result = [client login: theLogin authname: theAuthName password: thePassword];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
connected = NO;
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
|
||||
if (!connected)
|
||||
{
|
||||
NSLog(@"Sieve connection failed on %@", [address description]);
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (![[result valueForKey:@"result"] boolValue]) {
|
||||
NSLog(@"failure. Attempting with a renewed password (no authname supported)");
|
||||
thePassword = [theAccount imap4PasswordRenewed: YES];
|
||||
|
||||
Reference in New Issue
Block a user