mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-11-08 02:07:07 +00:00
[Web][Dovecot] Add retention rules: nightly deletion of mail by folder and age for domains, groups and mailboxes
This commit is contained in:
36 files changed
+3013
-16
No files matched your search
@@ -126,6 +126,17 @@ if (isset($_SESSION['mailcow_cc_role'])) {
|
||||
'mail_policy_groups' => !empty($result) ? $mail_policy->policies->groupChoices([$result['domain']]) : [],
|
||||
];
|
||||
}
|
||||
elseif (isset($_GET['retention-rule']) &&
|
||||
is_numeric($_GET['retention-rule'])) {
|
||||
$retention = \Mailcow\Retention\RetentionModule::fromGlobals();
|
||||
$result = $retention->api->getRule($_GET['retention-rule']);
|
||||
$template = 'edit/retention-rule.twig';
|
||||
// Choices: mailboxes and groups of the domain of the rule
|
||||
$template_data = [
|
||||
'mailboxes' => !empty($result) ? mailbox('get', 'mailboxes', $result['domain']) : [],
|
||||
'retention_groups' => !empty($result) ? $retention->rules->groupChoices([$result['domain']]) : [],
|
||||
];
|
||||
}
|
||||
elseif (isset($_GET['api-key']) &&
|
||||
is_numeric($_GET['api-key'])) {
|
||||
$result = \Mailcow\ApiKey\ApiKeyModule::fromGlobals()->api->getKey($_GET['api-key']);
|
||||
|
||||
Reference in new issue
Block a user