2017-12-09 20:17:15 +08:00
|
|
|
<?php
|
2018-10-11 17:59:23 +08:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
|
2017-12-09 20:17:15 +08:00
|
|
|
|
|
|
|
if (isset($_SESSION['mailcow_cc_role'])) {
|
2018-10-11 17:59:23 +08:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
|
2017-12-09 20:17:15 +08:00
|
|
|
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
2021-02-20 15:01:23 +08:00
|
|
|
$quarantine_settings = quarantine('settings');
|
2017-12-09 20:17:15 +08:00
|
|
|
?>
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2020-02-23 02:23:57 +08:00
|
|
|
<?=$lang['quarantine']['quarantine'];?> <span class="badge badge-info table-lines"></span>
|
|
|
|
<div class="btn-group pull-right">
|
|
|
|
<button class="btn btn-xs btn-default refresh_table" data-draw="draw_quarantine_table" data-table="quarantinetable"><?=$lang['quarantine']['refresh'];?></button>
|
|
|
|
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['quarantine']['table_size'];?>
|
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu" data-table-id="quarantinetable" role="menu">
|
|
|
|
<li><a href="#" data-page-size="10"><?=sprintf($lang['quarantine']['table_size_show_n'], 10);?></a></li>
|
|
|
|
<li><a href="#" data-page-size="20"><?=sprintf($lang['quarantine']['table_size_show_n'], 20);?></a></li>
|
|
|
|
<li><a href="#" data-page-size="50"><?=sprintf($lang['quarantine']['table_size_show_n'], 50);?></a></li>
|
|
|
|
<li><a href="#" data-page-size="100"><?=sprintf($lang['quarantine']['table_size_show_n'], 100);?></a></li>
|
|
|
|
<li><a href="#" data-page-size="200"><?=sprintf($lang['quarantine']['table_size_show_n'], 200);?></a></li>
|
|
|
|
<li><a href="#" data-page-size="500"><?=sprintf($lang['quarantine']['table_size_show_n'], 500);?></a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2017-12-09 20:17:15 +08:00
|
|
|
</div>
|
2018-02-09 03:13:36 +08:00
|
|
|
<p style="margin:10px" class="help-block"><?=$lang['quarantine']['qinfo'];?></p>
|
2018-12-01 02:04:18 +08:00
|
|
|
<p style="margin:10px">
|
|
|
|
<?php
|
2021-02-20 15:01:23 +08:00
|
|
|
if (empty($quarantine_settings['retention_size'] || $quarantine_settings['max_size'])) {
|
2018-12-01 02:04:18 +08:00
|
|
|
?>
|
2019-01-29 07:20:39 +08:00
|
|
|
<div class="panel-body"><div class="alert alert-info"><?=$lang['quarantine']['disabled_by_config'];?></div></div>
|
2018-12-01 02:04:18 +08:00
|
|
|
<?php
|
2021-02-20 15:01:23 +08:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
?>
|
|
|
|
<p style="margin:10px" class="help-block"><?=sprintf($lang['quarantine']['settings_info'], $quarantine_settings['retention_size'], $quarantine_settings['max_size']);?></p>
|
|
|
|
<?php
|
|
|
|
}
|
2018-12-01 02:04:18 +08:00
|
|
|
?>
|
|
|
|
</p>
|
2017-12-09 20:17:15 +08:00
|
|
|
<div class="table-responsive">
|
2018-02-09 03:13:36 +08:00
|
|
|
<table id="quarantinetable" class="table table-striped"></table>
|
2017-12-09 20:17:15 +08:00
|
|
|
</div>
|
2018-02-09 03:13:36 +08:00
|
|
|
<div class="mass-actions-quarantine">
|
2018-09-10 03:17:59 +08:00
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['quarantine'];?>">
|
2018-02-09 03:13:36 +08:00
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="qitems" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['quarantine']['toggle_all'];?></a>
|
|
|
|
<a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['quarantine']['quick_actions'];?> <span class="caret"></span></a>
|
2017-12-09 20:17:15 +08:00
|
|
|
<ul class="dropdown-menu">
|
2020-11-06 21:26:48 +08:00
|
|
|
<li><a data-action="edit_selected" data-id="qitems" data-api-url='edit/qitem' data-api-attr='{"action":"release"}' href="#"><?=$lang['quarantine']['deliver_inbox'];?></a></li>
|
2017-12-09 20:17:15 +08:00
|
|
|
<li role="separator" class="divider"></li>
|
[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)
[Docker API] Create pipe to pass Rspamd UI worker password
[Dovecot] Pull Spamassassin ruleset to be read by Rspamd (MANY THANKS to Peer Heinlein!)
[Dovecot] Garbage collector for deleted maildirs (set keep time via MAILDIR_GC_TIME which defaults to 1440 minutes)
[Web] Flush memcached after mailbox item changes, fixes #1808
[Web] Fix duplicate IDs, fixes #1792
[Compose] Use SQL sockets
[PHP-FPM] Update APCu and Redis libs
[Dovecot] Encrypt maildir with global key pair in crypt-vol-1 (BACKUP!), also fixes #1791
[Web] Fix deletion of spam aliases
[Helper] Add "crypt" to backup script
[Helper] Override file for external SQL socket (not supported!)
[Compose] New images for Rspamd, PHP-FPM, SOGo, Dovecot, Docker API, Watchdog, ACME, Postfix
2018-09-30 04:01:23 +08:00
|
|
|
<li><a data-action="edit_selected" data-id="qitems" data-api-url='edit/qitem' data-api-attr='{"action":"learnspam"}' href="#"><?=$lang['quarantine']['learn_spam_delete'];?></a></li>
|
2018-08-14 05:20:40 +08:00
|
|
|
<li role="separator" class="divider"></li>
|
[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)
[Docker API] Create pipe to pass Rspamd UI worker password
[Dovecot] Pull Spamassassin ruleset to be read by Rspamd (MANY THANKS to Peer Heinlein!)
[Dovecot] Garbage collector for deleted maildirs (set keep time via MAILDIR_GC_TIME which defaults to 1440 minutes)
[Web] Flush memcached after mailbox item changes, fixes #1808
[Web] Fix duplicate IDs, fixes #1792
[Compose] Use SQL sockets
[PHP-FPM] Update APCu and Redis libs
[Dovecot] Encrypt maildir with global key pair in crypt-vol-1 (BACKUP!), also fixes #1791
[Web] Fix deletion of spam aliases
[Helper] Add "crypt" to backup script
[Helper] Override file for external SQL socket (not supported!)
[Compose] New images for Rspamd, PHP-FPM, SOGo, Dovecot, Docker API, Watchdog, ACME, Postfix
2018-09-30 04:01:23 +08:00
|
|
|
<li><a data-action="delete_selected" data-id="qitems" data-api-url='delete/qitem' href="#"><?=$lang['quarantine']['remove'];?></a></li>
|
2017-12-09 20:17:15 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div> <!-- /col-md-12 -->
|
|
|
|
</div> <!-- /row -->
|
|
|
|
</div> <!-- /container -->
|
|
|
|
<?php
|
2018-02-09 03:13:36 +08:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/modals/quarantine.php';
|
2017-12-09 20:17:15 +08:00
|
|
|
?>
|
|
|
|
<script type='text/javascript'>
|
|
|
|
<?php
|
2020-11-06 21:26:48 +08:00
|
|
|
$lang_quarantine = json_encode($lang['quarantine']);
|
2019-01-29 07:20:39 +08:00
|
|
|
echo "var acl = '". json_encode($_SESSION['acl']) . "';\n";
|
2020-11-06 21:26:48 +08:00
|
|
|
echo "var lang = ". $lang_quarantine . ";\n";
|
2017-12-09 20:17:15 +08:00
|
|
|
echo "var csrf_token = '". $_SESSION['CSRF']['TOKEN'] . "';\n";
|
|
|
|
$role = ($_SESSION['mailcow_cc_role'] == "admin") ? 'admin' : 'domainadmin';
|
|
|
|
echo "var role = '". $role . "';\n";
|
|
|
|
echo "var pagination_size = '". $PAGINATION_SIZE . "';\n";
|
|
|
|
?>
|
|
|
|
</script>
|
|
|
|
<?php
|
2019-01-31 22:45:31 +08:00
|
|
|
$js_minifier->add('/web/js/site/quarantine.js');
|
2017-12-09 20:17:15 +08:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';
|
|
|
|
} else {
|
|
|
|
header('Location: /');
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
?>
|