[Web][Dovecot] Add retention rules: nightly deletion of mail by folder and age for domains, groups and mailboxes

This commit is contained in:
FreddleSpl0it committed 2026-11-07 21:23:13 +01:00
1 parent 46c9ec90b0
commit a64ee13670
36 files changed
+3013 -16

No files matched your search

+9 -7
View File
@@ -102,16 +102,18 @@ var mailcowMailPolicy = (function($) {
});
}
// add modal: mailboxes and groups of the chosen domain only
// add modal: mailboxes and groups of the chosen domain only. The options are rebuilt and bootstrap-select is
// built anew: its refresh repeats the list and still shows hidden options
function filterDomain($form) {
var domain = $form.find('select.mail-policy-domain-select').val();
$form.find('select.mail-policy-mailboxes, select.mail-policy-groups').each(function() {
$(this).find('option').each(function() {
var other = $(this).data('domain') !== domain;
$(this).prop('hidden', other);
if (other) $(this).prop('selected', false);
});
$(this).selectpicker('refresh');
var $select = $(this);
if (!$select.data('all-options')) $select.data('all-options', $select.children('option').clone());
$select.selectpicker('destroy');
$select.empty().append($select.data('all-options').filter(function() {
return $(this).data('domain') === domain;
}).clone().prop('selected', false));
$select.selectpicker({'styleBase': 'btn btn-xs-lg', 'noneSelectedText': lang_footer.nothing_selected});
});
}