Commit c7bde0cf authored by Marius Burkard's avatar Marius Burkard
Browse files

Merge branch '6113-undo-delete-mailbox' into 'develop'

Safe delete for mailboxes

Closes #6113

See merge request !1454
parents 51119d7c 0fd8879d
......@@ -3847,6 +3847,10 @@ class installer_base {
$root_cron_jobs[] = "0 0 * * * ".$install_dir."/server/scripts/create_daily_nginx_access_logs.sh &> /dev/null";
}
if ($conf['services']['mail'] == 1) {
$root_cron_jobs[] = "30 23 * * * ".$install_dir."/server/scripts/handle_mailbox_soft_deleted.sh &> /dev/null";
}
foreach($root_cron_jobs as $cron_job) {
if(!in_array($cron_job."\n", $existing_root_cron_jobs)) {
$existing_root_cron_jobs[] = $cron_job."\n";
......
......@@ -56,6 +56,7 @@ relayhost_user=
relayhost_password=
mailbox_size_limit=0
message_size_limit=0
mailbox_soft_delete=n
mailbox_quota_stats=y
realtime_blackhole_list=zen.spamhaus.org
overquota_notify_threshold=90
......
......@@ -734,6 +734,12 @@ $form["tabs"]['mail'] = array(
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'mailbox_soft_delete' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
'mailbox_quota_stats' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
......
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Usar links físicos é inseguro, mas eco
$wb['jailkit_hardlinks_allow_txt'] = 'Permitir links físicos enjaulados';
$wb['jailkit_hardlinks_no_txt'] = 'Não, remover arquivos de links físicos';
$wb['jailkit_hardlinks_yes_txt'] = 'Sim, usar links físicos quando possível';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'Ne, odstranit soubory s pevným odkazem';
$wb['jailkit_hardlinks_yes_txt'] = 'Ano, pokud je to možné, použijte pevné odkazy';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -348,3 +348,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -341,3 +341,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'L\'uso di hardlinks è meno sicuro però
$wb['jailkit_hardlinks_allow_txt'] = 'Consenti hardlinks all\'interno di jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, rimuovi i file con hardlink';
$wb['jailkit_hardlinks_yes_txt'] = 'Si, usa hardlinks se possibile';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
......@@ -342,3 +342,5 @@ $wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves d
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';
$wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete';
$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.';
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment