mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-07 20:45:28 +00:00
feat(mail): Deletion of mail older than x. Closes #6023. Remove also template folder. Change SOGoDisableMailCleaning to SOGoEnableMailCleaning (disabled by default).
This commit is contained in:
@@ -1678,8 +1678,8 @@ URL could be set to something like:
|
||||
|
||||
See the "EMail reminders" section in this document for more information.
|
||||
|
||||
|S |SOGoDisableMailCleaning
|
||||
|Parameter used to disable the feature 'remove mails older than X days' introduced in 5.12. Default value is `NO`.
|
||||
|S |SOGoEnableMailCleaning
|
||||
|Parameter used to enable cleaning folders and mailbox (remove mail older than X days). Default value is `NO`.
|
||||
|
||||
|S |SOGoDisableOrganizerEventCheck
|
||||
|Parameter used to disable organizer's calendar event check
|
||||
|
||||
@@ -142,7 +142,7 @@ NSComparisonResult languageSort(id el1, id el2, void *context);
|
||||
|
||||
- (NSString *)urlCreateAccount;
|
||||
|
||||
- (BOOL)disableMailCleaning;
|
||||
- (BOOL)enableMailCleaning;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -933,9 +933,9 @@ NSComparisonResult languageSort(id el1, id el2, void *context)
|
||||
return [self stringForKey: @"SOGoURLCreateAccount"];
|
||||
}
|
||||
|
||||
- (BOOL) disableMailCleaning
|
||||
- (BOOL) enableMailCleaning
|
||||
{
|
||||
return [self boolForKey: @"SOGoDisableMailCleaning"];
|
||||
return [self boolForKey: @"SOGoEnableMailCleaning"];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -1368,7 +1368,7 @@
|
||||
request = [[self context] request];
|
||||
jsonRequest = [[request contentAsString] objectFromJSONString];
|
||||
|
||||
if ([[SOGoSystemDefaults sharedSystemDefaults] disableMailCleaning])
|
||||
if (![[SOGoSystemDefaults sharedSystemDefaults] enableMailCleaning])
|
||||
return [self responseWithStatus: 401];
|
||||
|
||||
if (![self isDateStringValid: [jsonRequest objectForKey: @"date"]]) {
|
||||
@@ -1401,7 +1401,8 @@
|
||||
}
|
||||
folder = [account folderWithTraversal: folderName andClassName: nil];
|
||||
// Disable clean for trash folder
|
||||
if (![folderName isEqualToString: [account trashFolderNameInContext: [self context]]])
|
||||
if (![folderName isEqualToString: [account trashFolderNameInContext: [self context]]]
|
||||
&& ![folderName isEqualToString: [account templatesFolderNameInContext: [self context]]])
|
||||
[self cleanFolderWithFolder: folder
|
||||
withQualifier: searchQualifier
|
||||
recursive: isRecursive
|
||||
|
||||
@@ -617,7 +617,7 @@
|
||||
|
||||
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
|
||||
result = ![sd disableMailCleaning];
|
||||
result = [sd enableMailCleaning];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user