mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-18 19:48:53 +00:00
chore(tool): fallback to NGImap4ConnectionStringSeparator
When using a master user to update the Sieve scripts through sogo-tool, we may not be able to detect the IMAP delimiter. Therefore, we must fallback to the default NGImap4ConnectionStringSeparator. Fixes #4919
This commit is contained in:
@@ -843,7 +843,7 @@ static NSString *sieveScriptName = @"sogo";
|
||||
andPassword: (NSString *) thePassword
|
||||
forceActivation: (BOOL) forceActivation
|
||||
{
|
||||
NSString *filterScript, *v, *content, *message;
|
||||
NSString *filterScript, *v, *delimiter, *content, *message;
|
||||
NSMutableArray *req;
|
||||
NSMutableString *script, *header;
|
||||
NSDictionary *result, *values;
|
||||
@@ -901,12 +901,17 @@ static NSString *sieveScriptName = @"sogo";
|
||||
else
|
||||
imapClient = [[theAccount imap4Connection] client];
|
||||
|
||||
if (![imapClient delimiter])
|
||||
delimiter = [imapClient delimiter];
|
||||
|
||||
if (!delimiter)
|
||||
[imapClient list: @"INBOX" pattern: @""];
|
||||
|
||||
if (!delimiter)
|
||||
delimiter = [dd stringForKey: @"NGImap4ConnectionStringSeparator"];
|
||||
|
||||
// We first handle filters
|
||||
filterScript = [self sieveScriptWithRequirements: req
|
||||
delimiter: [imapClient delimiter]];
|
||||
delimiter: delimiter];
|
||||
if (filterScript)
|
||||
{
|
||||
if ([filterScript length])
|
||||
|
||||
Reference in New Issue
Block a user