mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-27 02:43:38 +02:00
[Web] Mind was set to french, reverting to english
This commit is contained in:
parent
fae542534d
commit
a50036477e
@ -1,5 +1,5 @@
|
|||||||
rules {
|
rules {
|
||||||
QUARANTAINE {
|
QUARANTINE {
|
||||||
backend = "http";
|
backend = "http";
|
||||||
url = "http://nginx:9081/pipe.php";
|
url = "http://nginx:9081/pipe.php";
|
||||||
selector = "is_reject";
|
selector = "is_reject";
|
||||||
|
@ -133,12 +133,12 @@ foreach (json_decode($rcpts, true) as $rcpt) {
|
|||||||
|
|
||||||
// Loop through all found gotos
|
// Loop through all found gotos
|
||||||
foreach ($gotos_array as $index => &$goto) {
|
foreach ($gotos_array as $index => &$goto) {
|
||||||
error_log("quarantaine pipe: query " . $goto . " as username from mailbox");
|
error_log("quarantine pipe: query " . $goto . " as username from mailbox");
|
||||||
$stmt = $pdo->prepare("SELECT `username` FROM `mailbox` WHERE `username` = :goto AND `active`= '1';");
|
$stmt = $pdo->prepare("SELECT `username` FROM `mailbox` WHERE `username` = :goto AND `active`= '1';");
|
||||||
$stmt->execute(array(':goto' => $goto));
|
$stmt->execute(array(':goto' => $goto));
|
||||||
$username = $stmt->fetch(PDO::FETCH_ASSOC)['username'];
|
$username = $stmt->fetch(PDO::FETCH_ASSOC)['username'];
|
||||||
if (!empty($username)) {
|
if (!empty($username)) {
|
||||||
error_log("quarantaine pipe: mailbox found: " . $username);
|
error_log("quarantine pipe: mailbox found: " . $username);
|
||||||
// Current goto is a mailbox, save to rcpt_final_mailboxes if not a duplicate
|
// Current goto is a mailbox, save to rcpt_final_mailboxes if not a duplicate
|
||||||
if (!in_array($username, $rcpt_final_mailboxes)) {
|
if (!in_array($username, $rcpt_final_mailboxes)) {
|
||||||
$rcpt_final_mailboxes[] = $username;
|
$rcpt_final_mailboxes[] = $username;
|
||||||
@ -153,7 +153,7 @@ foreach (json_decode($rcpts, true) as $rcpt) {
|
|||||||
$stmt = $pdo->prepare("SELECT `goto` FROM `alias` WHERE `address` = :goto AND `active` = '1'");
|
$stmt = $pdo->prepare("SELECT `goto` FROM `alias` WHERE `address` = :goto AND `active` = '1'");
|
||||||
$stmt->execute(array(':goto' => $goto));
|
$stmt->execute(array(':goto' => $goto));
|
||||||
$goto_branch = $stmt->fetch(PDO::FETCH_ASSOC)['goto'];
|
$goto_branch = $stmt->fetch(PDO::FETCH_ASSOC)['goto'];
|
||||||
error_log("quarantaine pipe: goto address " . $goto . " is a alias branch for " . $goto_branch);
|
error_log("quarantine pipe: goto address " . $goto . " is a alias branch for " . $goto_branch);
|
||||||
$goto_branch_array = explode(',', $goto_branch);
|
$goto_branch_array = explode(',', $goto_branch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -173,7 +173,7 @@ foreach (json_decode($rcpts, true) as $rcpt) {
|
|||||||
// Force exit if loop cannot be solved
|
// Force exit if loop cannot be solved
|
||||||
// Postfix does not allow for alias loops, so this should never happen.
|
// Postfix does not allow for alias loops, so this should never happen.
|
||||||
$loop_c++;
|
$loop_c++;
|
||||||
error_log("quarantaine pipe: goto array count on loop #". $loop_c . " is " . count($gotos_array));
|
error_log("quarantine pipe: goto array count on loop #". $loop_c . " is " . count($gotos_array));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (PDOException $e) {
|
catch (PDOException $e) {
|
||||||
@ -184,9 +184,9 @@ foreach (json_decode($rcpts, true) as $rcpt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($rcpt_final_mailboxes as $rcpt) {
|
foreach ($rcpt_final_mailboxes as $rcpt) {
|
||||||
error_log("quarantaine pipe: processing quarantaine message for rcpt " . $rcpt);
|
error_log("quarantine pipe: processing quarantine message for rcpt " . $rcpt);
|
||||||
try {
|
try {
|
||||||
$stmt = $pdo->prepare("INSERT INTO `quarantaine` (`qid`, `score`, `sender`, `rcpt`, `symbols`, `user`, `ip`, `msg`, `action`)
|
$stmt = $pdo->prepare("INSERT INTO `quarantine` (`qid`, `score`, `sender`, `rcpt`, `symbols`, `user`, `ip`, `msg`, `action`)
|
||||||
VALUES (:qid, :score, :sender, :rcpt, :symbols, :user, :ip, :msg, :action)");
|
VALUES (:qid, :score, :sender, :rcpt, :symbols, :user, :ip, :msg, :action)");
|
||||||
$stmt->execute(array(
|
$stmt->execute(array(
|
||||||
':qid' => $qid,
|
':qid' => $qid,
|
||||||
@ -199,11 +199,11 @@ foreach ($rcpt_final_mailboxes as $rcpt) {
|
|||||||
':msg' => $raw_data,
|
':msg' => $raw_data,
|
||||||
':action' => $action
|
':action' => $action
|
||||||
));
|
));
|
||||||
$stmt = $pdo->prepare('DELETE FROM `quarantaine` WHERE `rcpt` = :rcpt AND `id` NOT IN (
|
$stmt = $pdo->prepare('DELETE FROM `quarantine` WHERE `rcpt` = :rcpt AND `id` NOT IN (
|
||||||
SELECT `id`
|
SELECT `id`
|
||||||
FROM (
|
FROM (
|
||||||
SELECT `id`
|
SELECT `id`
|
||||||
FROM `quarantaine`
|
FROM `quarantine`
|
||||||
WHERE `rcpt` = :rcpt2
|
WHERE `rcpt` = :rcpt2
|
||||||
ORDER BY id DESC
|
ORDER BY id DESC
|
||||||
LIMIT :retention_size
|
LIMIT :retention_size
|
||||||
|
@ -147,7 +147,7 @@ $tfa_data = get_tfa();
|
|||||||
<a href="#fwdhosts" class="list-group-item"><?=$lang['admin']['forwarding_hosts'];?></a>
|
<a href="#fwdhosts" class="list-group-item"><?=$lang['admin']['forwarding_hosts'];?></a>
|
||||||
<a href="#f2bparams" class="list-group-item"><?=$lang['admin']['f2b_parameters'];?></a>
|
<a href="#f2bparams" class="list-group-item"><?=$lang['admin']['f2b_parameters'];?></a>
|
||||||
<a href="#relayhosts" class="list-group-item">Relayhosts</a>
|
<a href="#relayhosts" class="list-group-item">Relayhosts</a>
|
||||||
<a href="#quarantaine" class="list-group-item"><?=$lang['admin']['quarantaine'];?></a>
|
<a href="#quarantine" class="list-group-item"><?=$lang['admin']['quarantine'];?></a>
|
||||||
<a href="#customize" class="list-group-item"><?=$lang['admin']['customize'];?></a>
|
<a href="#customize" class="list-group-item"><?=$lang['admin']['customize'];?></a>
|
||||||
<a href="#top" class="list-group-item" style="border-top:1px dashed #dadada">↸ <?=$lang['admin']['to_top'];?></a>
|
<a href="#top" class="list-group-item" style="border-top:1px dashed #dadada">↸ <?=$lang['admin']['to_top'];?></a>
|
||||||
</div>
|
</div>
|
||||||
@ -414,28 +414,28 @@ $tfa_data = get_tfa();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="anchor" id="quarantaine"></span>
|
<span class="anchor" id="quarantine"></span>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading"><?=$lang['admin']['quarantaine'];?></div>
|
<div class="panel-heading"><?=$lang['admin']['quarantine'];?></div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<?php $q_data = quarantaine('settings'); ?>
|
<?php $q_data = quarantine('settings'); ?>
|
||||||
<form class="form" data-id="quarantaine" role="form" method="post">
|
<form class="form" data-id="quarantine" role="form" method="post">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="retention_size"><?=$lang['admin']['quarantaine_retention_size'];?></label>
|
<label for="retention_size"><?=$lang['admin']['quarantine_retention_size'];?></label>
|
||||||
<input type="number" class="form-control" id="retention_size" name="retention_size" value="<?=$q_data['retention_size'];?>" required>
|
<input type="number" class="form-control" id="retention_size" name="retention_size" value="<?=$q_data['retention_size'];?>" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="max_size"><?=$lang['admin']['quarantaine_max_size'];?></label>
|
<label for="max_size"><?=$lang['admin']['quarantine_max_size'];?></label>
|
||||||
<input type="number" class="form-control" id="max_size" name="max_size" value="<?=$q_data['max_size'];?>" required>
|
<input type="number" class="form-control" id="max_size" name="max_size" value="<?=$q_data['max_size'];?>" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="exclude_domains"><?=$lang['admin']['quarantaine_exclude_domains'];?></label><br />
|
<label for="exclude_domains"><?=$lang['admin']['quarantine_exclude_domains'];?></label><br />
|
||||||
<select data-width="100%" id="exclude_domains" name="exclude_domains" class="selectpicker" title="<?=$lang['tfa']['select'];?>" multiple>
|
<select data-width="100%" id="exclude_domains" name="exclude_domains" class="selectpicker" title="<?=$lang['tfa']['select'];?>" multiple>
|
||||||
<?php
|
<?php
|
||||||
foreach (array_merge(mailbox('get', 'domains'), mailbox('get', 'alias_domains')) as $domain):
|
foreach (array_merge(mailbox('get', 'domains'), mailbox('get', 'alias_domains')) as $domain):
|
||||||
@ -446,7 +446,7 @@ $tfa_data = get_tfa();
|
|||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-default" id="edit_selected" data-item="self" data-id="quarantaine" data-api-url='edit/quarantaine' data-api-attr='{"action":"settings"}' href="#"><span class="glyphicon glyphicon-check"></span> <?=$lang['admin']['save'];?></button>
|
<button class="btn btn-default" id="edit_selected" data-item="self" data-id="quarantine" data-api-url='edit/quarantine' data-api-attr='{"action":"settings"}' href="#"><span class="glyphicon glyphicon-check"></span> <?=$lang['admin']['save'];?></button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,7 +28,7 @@ table.footable>tbody>tr.footable-empty>td {
|
|||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.mass-actions-quarantaine {
|
.mass-actions-Quarantine {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
padding:10px 0 10px 10px;
|
padding:10px 0 10px 10px;
|
||||||
}
|
}
|
@ -23,7 +23,7 @@ function rrmdir($src) {
|
|||||||
}
|
}
|
||||||
if (!empty($_GET['id']) && ctype_alnum($_GET['id'])) {
|
if (!empty($_GET['id']) && ctype_alnum($_GET['id'])) {
|
||||||
$tmpdir = '/tmp/' . $_GET['id'] . '/';
|
$tmpdir = '/tmp/' . $_GET['id'] . '/';
|
||||||
$mailc = quarantaine('details', $_GET['id']);
|
$mailc = quarantine('details', $_GET['id']);
|
||||||
if (strlen($mailc['msg']) > 10485760) {
|
if (strlen($mailc['msg']) > 10485760) {
|
||||||
echo json_encode(array('error' => 'Message size exceeds 10 MiB.'));
|
echo json_encode(array('error' => 'Message size exceeds 10 MiB.'));
|
||||||
exit;
|
exit;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
function quarantaine($_action, $_data = null) {
|
function quarantine($_action, $_data = null) {
|
||||||
global $pdo;
|
global $pdo;
|
||||||
global $redis;
|
global $redis;
|
||||||
global $lang;
|
global $lang;
|
||||||
@ -12,7 +12,7 @@ function quarantaine($_action, $_data = null) {
|
|||||||
else {
|
else {
|
||||||
$ids = $_data['id'];
|
$ids = $_data['id'];
|
||||||
}
|
}
|
||||||
if (!isset($_SESSION['acl']['quarantaine']) || $_SESSION['acl']['quarantaine'] != "1" ) {
|
if (!isset($_SESSION['acl']['quarantine']) || $_SESSION['acl']['quarantine'] != "1" ) {
|
||||||
$_SESSION['return'] = array(
|
$_SESSION['return'] = array(
|
||||||
'type' => 'danger',
|
'type' => 'danger',
|
||||||
'msg' => sprintf($lang['danger']['access_denied'])
|
'msg' => sprintf($lang['danger']['access_denied'])
|
||||||
@ -28,12 +28,12 @@ function quarantaine($_action, $_data = null) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$stmt = $pdo->prepare('SELECT `rcpt` FROM `quarantaine` WHERE `id` = :id');
|
$stmt = $pdo->prepare('SELECT `rcpt` FROM `quarantine` WHERE `id` = :id');
|
||||||
$stmt->execute(array(':id' => $id));
|
$stmt->execute(array(':id' => $id));
|
||||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
if (hasMailboxObjectAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $row['rcpt'])) {
|
if (hasMailboxObjectAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $row['rcpt'])) {
|
||||||
try {
|
try {
|
||||||
$stmt = $pdo->prepare("DELETE FROM `quarantaine` WHERE `id` = :id");
|
$stmt = $pdo->prepare("DELETE FROM `quarantine` WHERE `id` = :id");
|
||||||
$stmt->execute(array(
|
$stmt->execute(array(
|
||||||
':id' => $id
|
':id' => $id
|
||||||
));
|
));
|
||||||
@ -67,7 +67,7 @@ function quarantaine($_action, $_data = null) {
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'edit':
|
case 'edit':
|
||||||
if (!isset($_SESSION['acl']['quarantaine']) || $_SESSION['acl']['quarantaine'] != "1" ) {
|
if (!isset($_SESSION['acl']['quarantine']) || $_SESSION['acl']['quarantine'] != "1" ) {
|
||||||
$_SESSION['return'] = array(
|
$_SESSION['return'] = array(
|
||||||
'type' => 'danger',
|
'type' => 'danger',
|
||||||
'msg' => sprintf($lang['danger']['access_denied'])
|
'msg' => sprintf($lang['danger']['access_denied'])
|
||||||
@ -121,7 +121,7 @@ function quarantaine($_action, $_data = null) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$stmt = $pdo->prepare('SELECT `msg`, `qid`, `sender`, `rcpt` FROM `quarantaine` WHERE `id` = :id');
|
$stmt = $pdo->prepare('SELECT `msg`, `qid`, `sender`, `rcpt` FROM `quarantine` WHERE `id` = :id');
|
||||||
$stmt->execute(array(':id' => $id));
|
$stmt->execute(array(':id' => $id));
|
||||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
if (!hasMailboxObjectAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $row['rcpt'])) {
|
if (!hasMailboxObjectAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $row['rcpt'])) {
|
||||||
@ -167,13 +167,13 @@ function quarantaine($_action, $_data = null) {
|
|||||||
$mail->Port = 590;
|
$mail->Port = 590;
|
||||||
$mail->setFrom($sender);
|
$mail->setFrom($sender);
|
||||||
$mail->CharSet = 'UTF-8';
|
$mail->CharSet = 'UTF-8';
|
||||||
$mail->Subject = sprintf($lang['quarantaine']['release_subject'], $row['qid']);
|
$mail->Subject = sprintf($lang['quarantine']['release_subject'], $row['qid']);
|
||||||
$mail->addAddress($row['rcpt']);
|
$mail->addAddress($row['rcpt']);
|
||||||
$mail->IsHTML(false);
|
$mail->IsHTML(false);
|
||||||
$msg_tmpf = tempnam("/tmp", $row['qid']);
|
$msg_tmpf = tempnam("/tmp", $row['qid']);
|
||||||
file_put_contents($msg_tmpf, $row['msg']);
|
file_put_contents($msg_tmpf, $row['msg']);
|
||||||
$mail->addAttachment($msg_tmpf, $row['qid'] . '.eml');
|
$mail->addAttachment($msg_tmpf, $row['qid'] . '.eml');
|
||||||
$mail->Body = sprintf($lang['quarantaine']['release_body']);
|
$mail->Body = sprintf($lang['quarantine']['release_body']);
|
||||||
$mail->send();
|
$mail->send();
|
||||||
unlink($msg_tmpf);
|
unlink($msg_tmpf);
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ function quarantaine($_action, $_data = null) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$stmt = $pdo->prepare("DELETE FROM `quarantaine` WHERE `id` = :id");
|
$stmt = $pdo->prepare("DELETE FROM `quarantine` WHERE `id` = :id");
|
||||||
$stmt->execute(array(
|
$stmt->execute(array(
|
||||||
':id' => $id
|
':id' => $id
|
||||||
));
|
));
|
||||||
@ -209,7 +209,7 @@ function quarantaine($_action, $_data = null) {
|
|||||||
case 'get':
|
case 'get':
|
||||||
try {
|
try {
|
||||||
if ($_SESSION['mailcow_cc_role'] == "user") {
|
if ($_SESSION['mailcow_cc_role'] == "user") {
|
||||||
$stmt = $pdo->prepare('SELECT `id`, `qid`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantaine` WHERE `rcpt` = :mbox');
|
$stmt = $pdo->prepare('SELECT `id`, `qid`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantine` WHERE `rcpt` = :mbox');
|
||||||
$stmt->execute(array(':mbox' => $_SESSION['mailcow_cc_username']));
|
$stmt->execute(array(':mbox' => $_SESSION['mailcow_cc_username']));
|
||||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
while($row = array_shift($rows)) {
|
while($row = array_shift($rows)) {
|
||||||
@ -217,7 +217,7 @@ function quarantaine($_action, $_data = null) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($_SESSION['mailcow_cc_role'] == "admin") {
|
elseif ($_SESSION['mailcow_cc_role'] == "admin") {
|
||||||
$stmt = $pdo->query('SELECT `id`, `qid`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantaine`');
|
$stmt = $pdo->query('SELECT `id`, `qid`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantine`');
|
||||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
while($row = array_shift($rows)) {
|
while($row = array_shift($rows)) {
|
||||||
$q_meta[] = $row;
|
$q_meta[] = $row;
|
||||||
@ -226,7 +226,7 @@ function quarantaine($_action, $_data = null) {
|
|||||||
else {
|
else {
|
||||||
$domains = array_merge(mailbox('get', 'domains'), mailbox('get', 'alias_domains'));
|
$domains = array_merge(mailbox('get', 'domains'), mailbox('get', 'alias_domains'));
|
||||||
foreach ($domains as $domain) {
|
foreach ($domains as $domain) {
|
||||||
$stmt = $pdo->prepare('SELECT `id`, `qid`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantaine` WHERE `rcpt` REGEXP :domain');
|
$stmt = $pdo->prepare('SELECT `id`, `qid`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantine` WHERE `rcpt` REGEXP :domain');
|
||||||
$stmt->execute(array(':domain' => '@' . $domain . '$'));
|
$stmt->execute(array(':domain' => '@' . $domain . '$'));
|
||||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
while($row = array_shift($rows)) {
|
while($row = array_shift($rows)) {
|
||||||
@ -270,7 +270,7 @@ function quarantaine($_action, $_data = null) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$stmt = $pdo->prepare('SELECT `rcpt`, `symbols`, `msg`, `domain` FROM `quarantaine` WHERE `id`= :id');
|
$stmt = $pdo->prepare('SELECT `rcpt`, `symbols`, `msg`, `domain` FROM `quarantine` WHERE `id`= :id');
|
||||||
$stmt->execute(array(':id' => $_data));
|
$stmt->execute(array(':id' => $_data));
|
||||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
if (hasMailboxObjectAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $row['rcpt'])) {
|
if (hasMailboxObjectAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $row['rcpt'])) {
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<?= (preg_match("/admin.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/admin.css">' : null; ?>
|
<?= (preg_match("/admin.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/admin.css">' : null; ?>
|
||||||
<?= (preg_match("/user.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/user.css">' : null; ?>
|
<?= (preg_match("/user.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/user.css">' : null; ?>
|
||||||
<?= (preg_match("/edit.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/edit.css">' : null; ?>
|
<?= (preg_match("/edit.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/edit.css">' : null; ?>
|
||||||
<?= (preg_match("/quarantaine.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/quarantaine.css">' : null; ?>
|
<?= (preg_match("/quarantine.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/quarantine.css">' : null; ?>
|
||||||
<?= (preg_match("/debug.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/debug.css">' : null; ?>
|
<?= (preg_match("/debug.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/debug.css">' : null; ?>
|
||||||
<link rel="shortcut icon" href="/favicon.png" type="image/png">
|
<link rel="shortcut icon" href="/favicon.png" type="image/png">
|
||||||
<link rel="icon" href="/favicon.png" type="image/png">
|
<link rel="icon" href="/favicon.png" type="image/png">
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<?php
|
<?php
|
||||||
if (isset($_SESSION['mailcow_cc_role'])) {
|
if (isset($_SESSION['mailcow_cc_role'])) {
|
||||||
?>
|
?>
|
||||||
<li<?= (preg_match("/quarantaine/i", $_SERVER['REQUEST_URI'])) ? ' class="active"' : ''; ?>><a href="/quarantaine.php"><span class="glyphicon glyphicon-briefcase"></span> <?= $lang['header']['quarantaine']; ?></a></li>
|
<li<?= (preg_match("/quarantine/i", $_SERVER['REQUEST_URI'])) ? ' class="active"' : ''; ?>><a href="/quarantine.php"><span class="glyphicon glyphicon-briefcase"></span> <?= $lang['header']['quarantine']; ?></a></li>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ($_SESSION['mailcow_cc_role'] == 'admin') {
|
if ($_SESSION['mailcow_cc_role'] == 'admin') {
|
||||||
|
@ -3,7 +3,7 @@ function init_db_schema() {
|
|||||||
try {
|
try {
|
||||||
global $pdo;
|
global $pdo;
|
||||||
|
|
||||||
$db_version = "08022018_1219";
|
$db_version = "08022018_2019";
|
||||||
|
|
||||||
$stmt = $pdo->query("SHOW TABLES LIKE 'versions'");
|
$stmt = $pdo->query("SHOW TABLES LIKE 'versions'");
|
||||||
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||||
@ -154,7 +154,7 @@ function init_db_schema() {
|
|||||||
),
|
),
|
||||||
"attr" => "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC"
|
"attr" => "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC"
|
||||||
),
|
),
|
||||||
"quarantaine" => array(
|
"quarantine" => array(
|
||||||
"cols" => array(
|
"cols" => array(
|
||||||
"id" => "INT NOT NULL AUTO_INCREMENT",
|
"id" => "INT NOT NULL AUTO_INCREMENT",
|
||||||
"qid" => "VARCHAR(30) NOT NULL",
|
"qid" => "VARCHAR(30) NOT NULL",
|
||||||
@ -244,7 +244,7 @@ function init_db_schema() {
|
|||||||
"syncjobs" => "TINYINT(1) NOT NULL DEFAULT '1'",
|
"syncjobs" => "TINYINT(1) NOT NULL DEFAULT '1'",
|
||||||
"eas_reset" => "TINYINT(1) NOT NULL DEFAULT '1'",
|
"eas_reset" => "TINYINT(1) NOT NULL DEFAULT '1'",
|
||||||
"filters" => "TINYINT(1) NOT NULL DEFAULT '1'",
|
"filters" => "TINYINT(1) NOT NULL DEFAULT '1'",
|
||||||
"quarantaine" => "TINYINT(1) NOT NULL DEFAULT '1'",
|
"quarantine" => "TINYINT(1) NOT NULL DEFAULT '1'",
|
||||||
"bcc_maps" => "TINYINT(1) NOT NULL DEFAULT '0'",
|
"bcc_maps" => "TINYINT(1) NOT NULL DEFAULT '0'",
|
||||||
"recipient_maps" => "TINYINT(1) NOT NULL DEFAULT '0'",
|
"recipient_maps" => "TINYINT(1) NOT NULL DEFAULT '0'",
|
||||||
),
|
),
|
||||||
@ -621,6 +621,13 @@ function init_db_schema() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
foreach ($tables as $table => $properties) {
|
foreach ($tables as $table => $properties) {
|
||||||
|
if ($table == 'quarantine') {
|
||||||
|
$stmt = $pdo->query("SHOW TABLES LIKE 'quarantaine'");
|
||||||
|
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||||
|
if ($num_results != 0) {
|
||||||
|
$pdo->query("RENAME TABLE `quarantaine` TO `quarantine`");
|
||||||
|
}
|
||||||
|
}
|
||||||
$stmt = $pdo->query("SHOW TABLES LIKE '" . $table . "'");
|
$stmt = $pdo->query("SHOW TABLES LIKE '" . $table . "'");
|
||||||
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||||
if ($num_results != 0) {
|
if ($num_results != 0) {
|
||||||
|
@ -83,7 +83,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.mailbox.inc.php';
|
|||||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.customize.inc.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.customize.inc.php';
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.address_rewriting.inc.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.address_rewriting.inc.php';
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.domain_admin.inc.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.domain_admin.inc.php';
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.quarantaine.inc.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.quarantine.inc.php';
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.policy.inc.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.policy.inc.php';
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.dkim.inc.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.dkim.inc.php';
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.fwdhost.inc.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.fwdhost.inc.php';
|
||||||
|
@ -6,8 +6,8 @@ jQuery(function($){
|
|||||||
function escapeHtml(n){return String(n).replace(/[&<>"'`=\/]/g,function(n){return entityMap[n]})}
|
function escapeHtml(n){return String(n).replace(/[&<>"'`=\/]/g,function(n){return entityMap[n]})}
|
||||||
function humanFileSize(i){if(Math.abs(i)<1024)return i+" B";var B=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],e=-1;do{i/=1024,++e}while(Math.abs(i)>=1024&&e<B.length-1);return i.toFixed(1)+" "+B[e]}
|
function humanFileSize(i){if(Math.abs(i)<1024)return i+" B";var B=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],e=-1;do{i/=1024,++e}while(Math.abs(i)>=1024&&e<B.length-1);return i.toFixed(1)+" "+B[e]}
|
||||||
|
|
||||||
function draw_quarantaine_table() {
|
function draw_quarantine_table() {
|
||||||
ft_quarantainetable = FooTable.init('#quarantainetable', {
|
ft_quarantinetable = FooTable.init('#quarantinetable', {
|
||||||
"columns": [
|
"columns": [
|
||||||
{"name":"chkbox","title":"","style":{"maxWidth":"40px","width":"40px"},"filterable": false,"sortable": false,"type":"html"},
|
{"name":"chkbox","title":"","style":{"maxWidth":"40px","width":"40px"},"filterable": false,"sortable": false,"type":"html"},
|
||||||
{"name":"id","type":"ID","filterable": false,"sorted": true,"direction":"DESC","title":"ID","style":{"width":"50px"}},
|
{"name":"id","type":"ID","filterable": false,"sorted": true,"direction":"DESC","title":"ID","style":{"width":"50px"}},
|
||||||
@ -19,10 +19,10 @@ jQuery(function($){
|
|||||||
],
|
],
|
||||||
"rows": $.ajax({
|
"rows": $.ajax({
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
url: '/api/v1/get/quarantaine/all',
|
url: '/api/v1/get/quarantine/all',
|
||||||
jsonp: false,
|
jsonp: false,
|
||||||
error: function () {
|
error: function () {
|
||||||
console.log('Cannot draw quarantaine table');
|
console.log('Cannot draw quarantine table');
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
$.each(data, function (i, item) {
|
$.each(data, function (i, item) {
|
||||||
@ -38,14 +38,14 @@ jQuery(function($){
|
|||||||
"paging": {"enabled": true,"limit": 5,"size": pagination_size},
|
"paging": {"enabled": true,"limit": 5,"size": pagination_size},
|
||||||
"sorting": {"enabled": true},
|
"sorting": {"enabled": true},
|
||||||
"on": {
|
"on": {
|
||||||
"ready.ft.table": btn_group_quarantaine,
|
"ready.ft.table": btn_group_quarantine,
|
||||||
"after.ft.paging": btn_group_quarantaine
|
"after.ft.paging": btn_group_quarantine
|
||||||
},
|
},
|
||||||
"filtering": {"enabled": true,"position": "left","connectors": false,"placeholder": lang.filter_table},
|
"filtering": {"enabled": true,"position": "left","connectors": false,"placeholder": lang.filter_table},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
btn_group_quarantaine = function(ev, ft){
|
btn_group_quarantine = function(ev, ft){
|
||||||
$('.show_qid_info').on('click', function (e) {
|
$('.show_qid_info').on('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var qitem = $(this).data('item');
|
var qitem = $(this).data('item');
|
||||||
@ -80,5 +80,5 @@ jQuery(function($){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// Initial table drawings
|
// Initial table drawings
|
||||||
draw_quarantaine_table();
|
draw_quarantine_table();
|
||||||
});
|
});
|
@ -1386,11 +1386,11 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "quarantaine":
|
case "quarantine":
|
||||||
// "all" will not print details
|
// "all" will not print details
|
||||||
switch ($object) {
|
switch ($object) {
|
||||||
case "all":
|
case "all":
|
||||||
$data = quarantaine('get');
|
$data = quarantine('get');
|
||||||
if (!isset($data) || empty($data)) {
|
if (!isset($data) || empty($data)) {
|
||||||
echo '{}';
|
echo '{}';
|
||||||
}
|
}
|
||||||
@ -1399,7 +1399,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$data = quarantaine('details', $object);
|
$data = quarantine('details', $object);
|
||||||
if (!isset($data) || empty($data)) {
|
if (!isset($data) || empty($data)) {
|
||||||
echo '{}';
|
echo '{}';
|
||||||
}
|
}
|
||||||
@ -1729,7 +1729,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
|
|||||||
if (isset($_POST['items'])) {
|
if (isset($_POST['items'])) {
|
||||||
$items = (array)json_decode($_POST['items'], true);
|
$items = (array)json_decode($_POST['items'], true);
|
||||||
if (is_array($items)) {
|
if (is_array($items)) {
|
||||||
if (quarantaine('delete', array('id' => $items)) === false) {
|
if (quarantine('delete', array('id' => $items)) === false) {
|
||||||
if (isset($_SESSION['return'])) {
|
if (isset($_SESSION['return'])) {
|
||||||
echo json_encode($_SESSION['return']);
|
echo json_encode($_SESSION['return']);
|
||||||
}
|
}
|
||||||
@ -2615,7 +2615,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
|
|||||||
$attr = (array)json_decode($_POST['attr'], true);
|
$attr = (array)json_decode($_POST['attr'], true);
|
||||||
$postarray = array_merge(array('id' => $items), $attr);
|
$postarray = array_merge(array('id' => $items), $attr);
|
||||||
if (is_array($postarray['id'])) {
|
if (is_array($postarray['id'])) {
|
||||||
if (quarantaine('edit', $postarray) === false) {
|
if (quarantine('edit', $postarray) === false) {
|
||||||
if (isset($_SESSION['return'])) {
|
if (isset($_SESSION['return'])) {
|
||||||
echo json_encode($_SESSION['return']);
|
echo json_encode($_SESSION['return']);
|
||||||
}
|
}
|
||||||
@ -2653,11 +2653,11 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "quarantaine":
|
case "quarantine":
|
||||||
// Edit settings, does not need IDs
|
// Edit settings, does not need IDs
|
||||||
if (isset($_POST['attr'])) {
|
if (isset($_POST['attr'])) {
|
||||||
$postarray = json_decode($_POST['attr'], true);
|
$postarray = json_decode($_POST['attr'], true);
|
||||||
if (quarantaine('edit', $postarray) === false) {
|
if (quarantine('edit', $postarray) === false) {
|
||||||
if (isset($_SESSION['return'])) {
|
if (isset($_SESSION['return'])) {
|
||||||
echo json_encode($_SESSION['return']);
|
echo json_encode($_SESSION['return']);
|
||||||
}
|
}
|
||||||
|
@ -625,32 +625,32 @@ $lang['success']['reset_main_logo'] = "Standardgrafik wurde wiederhergestellt";
|
|||||||
$lang['success']['items_released'] = "Ausgewählte Objekte wurden an Mailbox versendet";
|
$lang['success']['items_released'] = "Ausgewählte Objekte wurden an Mailbox versendet";
|
||||||
$lang['danger']['imagick_exception'] = "Fataler Bildverarbeitungsfehler";
|
$lang['danger']['imagick_exception'] = "Fataler Bildverarbeitungsfehler";
|
||||||
|
|
||||||
$lang['quarantaine']['quarantaine'] = "Quarantäne";
|
$lang['quarantine']['quarantine'] = "Quarantäne";
|
||||||
$lang['quarantaine']['qinfo'] = "Das Quarantänesystem speichert abgelehnte Nachrichten in der Datenbank. Dem Sender wird <em>nicht</em> signalisiert, dass seine E-Mail zugestellt wurde.";
|
$lang['quarantine']['qinfo'] = "Das Quarantänesystem speichert abgelehnte Nachrichten in der Datenbank. Dem Sender wird <em>nicht</em> signalisiert, dass seine E-Mail zugestellt wurde.";
|
||||||
$lang['quarantaine']['release'] = "Freigeben";
|
$lang['quarantine']['release'] = "Freigeben";
|
||||||
$lang['quarantaine']['empty'] = 'Keine Einträge';
|
$lang['quarantine']['empty'] = 'Keine Einträge';
|
||||||
$lang['quarantaine']['toggle_all'] = 'Alle auswählen';
|
$lang['quarantine']['toggle_all'] = 'Alle auswählen';
|
||||||
$lang['quarantaine']['quick_actions'] = 'Aktionen';
|
$lang['quarantine']['quick_actions'] = 'Aktionen';
|
||||||
$lang['quarantaine']['remove'] = 'Entfernen';
|
$lang['quarantine']['remove'] = 'Entfernen';
|
||||||
$lang['quarantaine']['received'] = "Empfangen";
|
$lang['quarantine']['received'] = "Empfangen";
|
||||||
$lang['quarantaine']['action'] = "Aktion";
|
$lang['quarantine']['action'] = "Aktion";
|
||||||
$lang['quarantaine']['rcpt'] = "Empfänger";
|
$lang['quarantine']['rcpt'] = "Empfänger";
|
||||||
$lang['quarantaine']['qid'] = "Rspamd QID";
|
$lang['quarantine']['qid'] = "Rspamd QID";
|
||||||
$lang['quarantaine']['sender'] = "Sender";
|
$lang['quarantine']['sender'] = "Sender";
|
||||||
$lang['quarantaine']['show_item'] = "Details";
|
$lang['quarantine']['show_item'] = "Details";
|
||||||
$lang['quarantaine']['check_hash'] = "Checksumme auf VirusTotal suchen";
|
$lang['quarantine']['check_hash'] = "Checksumme auf VirusTotal suchen";
|
||||||
$lang['quarantaine']['qitem'] = "Quarantäneeintrag";
|
$lang['quarantine']['qitem'] = "Quarantäneeintrag";
|
||||||
$lang['quarantaine']['subj'] = "Betreff";
|
$lang['quarantine']['subj'] = "Betreff";
|
||||||
$lang['quarantaine']['text_plain_content'] = "Inhalt (text/plain)";
|
$lang['quarantine']['text_plain_content'] = "Inhalt (text/plain)";
|
||||||
$lang['quarantaine']['text_from_html_content'] = "Inhalt (html, konvertiert)";
|
$lang['quarantine']['text_from_html_content'] = "Inhalt (html, konvertiert)";
|
||||||
$lang['quarantaine']['atts'] = "Anhänge";
|
$lang['quarantine']['atts'] = "Anhänge";
|
||||||
|
|
||||||
$lang['header']['quarantaine'] = "Quarantäne";
|
$lang['header']['quarantine'] = "Quarantäne";
|
||||||
$lang['header']['debug'] = "Debugging";
|
$lang['header']['debug'] = "Debugging";
|
||||||
|
|
||||||
$lang['quarantaine']['release_body'] = "Die ursprüngliche Nachricht wurde als EML-Datei im Anhang hinterlegt.";
|
$lang['quarantine']['release_body'] = "Die ursprüngliche Nachricht wurde als EML-Datei im Anhang hinterlegt.";
|
||||||
$lang['danger']['release_send_failed'] = "Die Nachricht konnte nicht versendet werden: %s";
|
$lang['danger']['release_send_failed'] = "Die Nachricht konnte nicht versendet werden: %s";
|
||||||
$lang['quarantaine']['release_subject'] = "Potentiell schädliche Nachricht aus Quarantäne: %s";
|
$lang['quarantine']['release_subject'] = "Potentiell schädliche Nachricht aus Quarantäne: %s";
|
||||||
|
|
||||||
$lang['mailbox']['bcc_map_type'] = "BCC Typ";
|
$lang['mailbox']['bcc_map_type'] = "BCC Typ";
|
||||||
$lang['mailbox']['bcc_type'] = "BCC Typ";
|
$lang['mailbox']['bcc_type'] = "BCC Typ";
|
||||||
|
@ -576,10 +576,10 @@ $lang['admin']['api_key'] = "API key";
|
|||||||
$lang['admin']['activate_api'] = "Activate API";
|
$lang['admin']['activate_api'] = "Activate API";
|
||||||
$lang['admin']['regen_api_key'] = "Regenerate API key";
|
$lang['admin']['regen_api_key'] = "Regenerate API key";
|
||||||
|
|
||||||
$lang['admin']['quarantaine'] = "Quarantine";
|
$lang['admin']['quarantine'] = "Quarantine";
|
||||||
$lang['admin']['quarantaine_retention_size'] = "Retentions per mailbox:";
|
$lang['admin']['quarantine_retention_size'] = "Retentions per mailbox:";
|
||||||
$lang['admin']['quarantaine_max_size'] = "Maximum size in MiB (larger elements are discarded):";
|
$lang['admin']['quarantine_max_size'] = "Maximum size in MiB (larger elements are discarded):";
|
||||||
$lang['admin']['quarantaine_exclude_domains'] = "Exclude domains and alias-domains:";
|
$lang['admin']['quarantine_exclude_domains'] = "Exclude domains and alias-domains:";
|
||||||
|
|
||||||
$lang['admin']['ui_texts'] = "UI labels and texts";
|
$lang['admin']['ui_texts'] = "UI labels and texts";
|
||||||
$lang['admin']['help_text'] = "Override help text below login mask (HTML allowed)";
|
$lang['admin']['help_text'] = "Override help text below login mask (HTML allowed)";
|
||||||
@ -620,32 +620,32 @@ $lang['success']['reset_main_logo'] = "Reset to default logo";
|
|||||||
$lang['success']['items_released'] = "Selected items were released";
|
$lang['success']['items_released'] = "Selected items were released";
|
||||||
$lang['danger']['imagick_exception'] = "Error: Imagick exception while reading image";
|
$lang['danger']['imagick_exception'] = "Error: Imagick exception while reading image";
|
||||||
|
|
||||||
$lang['quarantaine']['quarantaine'] = "Quarantine";
|
$lang['quarantine']['quarantine'] = "Quarantine";
|
||||||
$lang['quarantaine']['qinfo'] = "The quarantine system will save rejected mail to the database, while the sender will <em>not</em> be given the impression of a delivered mail.";
|
$lang['quarantine']['qinfo'] = "The quarantine system will save rejected mail to the database, while the sender will <em>not</em> be given the impression of a delivered mail.";
|
||||||
$lang['quarantaine']['release'] = "Release";
|
$lang['quarantine']['release'] = "Release";
|
||||||
$lang['quarantaine']['empty'] = 'No results';
|
$lang['quarantine']['empty'] = 'No results';
|
||||||
$lang['quarantaine']['toggle_all'] = 'Toggle all';
|
$lang['quarantine']['toggle_all'] = 'Toggle all';
|
||||||
$lang['quarantaine']['quick_actions'] = 'Actions';
|
$lang['quarantine']['quick_actions'] = 'Actions';
|
||||||
$lang['quarantaine']['remove'] = 'Remove';
|
$lang['quarantine']['remove'] = 'Remove';
|
||||||
$lang['quarantaine']['received'] = "Received";
|
$lang['quarantine']['received'] = "Received";
|
||||||
$lang['quarantaine']['action'] = "Action";
|
$lang['quarantine']['action'] = "Action";
|
||||||
$lang['quarantaine']['rcpt'] = "Recipient";
|
$lang['quarantine']['rcpt'] = "Recipient";
|
||||||
$lang['quarantaine']['qid'] = "Rspamd QID";
|
$lang['quarantine']['qid'] = "Rspamd QID";
|
||||||
$lang['quarantaine']['sender'] = "Sender";
|
$lang['quarantine']['sender'] = "Sender";
|
||||||
$lang['quarantaine']['show_item'] = "Show item";
|
$lang['quarantine']['show_item'] = "Show item";
|
||||||
$lang['quarantaine']['check_hash'] = "Search file hash @ VT";
|
$lang['quarantine']['check_hash'] = "Search file hash @ VT";
|
||||||
$lang['quarantaine']['qitem'] = "Quarantine item";
|
$lang['quarantine']['qitem'] = "Quarantine item";
|
||||||
$lang['quarantaine']['subj'] = "Subject";
|
$lang['quarantine']['subj'] = "Subject";
|
||||||
$lang['quarantaine']['text_plain_content'] = "Content (text/plain)";
|
$lang['quarantine']['text_plain_content'] = "Content (text/plain)";
|
||||||
$lang['quarantaine']['text_from_html_content'] = "Content (converted html)";
|
$lang['quarantine']['text_from_html_content'] = "Content (converted html)";
|
||||||
$lang['quarantaine']['atts'] = "Attachments";
|
$lang['quarantine']['atts'] = "Attachments";
|
||||||
|
|
||||||
$lang['header']['quarantaine'] = "Quarantine";
|
$lang['header']['quarantine'] = "Quarantine";
|
||||||
$lang['header']['debug'] = "Debug";
|
$lang['header']['debug'] = "Debug";
|
||||||
|
|
||||||
$lang['quarantaine']['release_body'] = "We have attached your message as eml file to this message.";
|
$lang['quarantine']['release_body'] = "We have attached your message as eml file to this message.";
|
||||||
$lang['danger']['release_send_failed'] = "Message could not be released: %s";
|
$lang['danger']['release_send_failed'] = "Message could not be released: %s";
|
||||||
$lang['quarantaine']['release_subject'] = "Potentially damaging quarantine item %s";
|
$lang['quarantine']['release_subject'] = "Potentially damaging quarantine item %s";
|
||||||
|
|
||||||
$lang['mailbox']['bcc_map_type'] = "BCC type";
|
$lang['mailbox']['bcc_map_type'] = "BCC type";
|
||||||
$lang['mailbox']['bcc_type'] = "BCC type";
|
$lang['mailbox']['bcc_type'] = "BCC type";
|
||||||
|
@ -9,24 +9,24 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
|
|||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
||||||
<h3 class="modal-title"><span class="glyphicon glyphicon-info"></span> <?=$lang['quarantaine']['qitem'];?></h3>
|
<h3 class="modal-title"><span class="glyphicon glyphicon-info"></span> <?=$lang['quarantine']['qitem'];?></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div id="qid_error" style="display:none" class="alert alert-danger"></div>
|
<div id="qid_error" style="display:none" class="alert alert-danger"></div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="qid_detail_subj"><h4><?=$lang['quarantaine']['subj'];?>:</h4></label>
|
<label for="qid_detail_subj"><h4><?=$lang['quarantine']['subj'];?>:</h4></label>
|
||||||
<p id="qid_detail_subj"></p>
|
<p id="qid_detail_subj"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="qid_detail_text"><h4><?=$lang['quarantaine']['text_plain_content'];?>:</h4></label>
|
<label for="qid_detail_text"><h4><?=$lang['quarantine']['text_plain_content'];?>:</h4></label>
|
||||||
<pre id="qid_detail_text"></pre>
|
<pre id="qid_detail_text"></pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="qid_detail_text_from_html"><h4><?=$lang['quarantaine']['text_from_html_content'];?>:</h4></label>
|
<label for="qid_detail_text_from_html"><h4><?=$lang['quarantine']['text_from_html_content'];?>:</h4></label>
|
||||||
<pre id="qid_detail_text_from_html"></pre>
|
<pre id="qid_detail_text_from_html"></pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="qid_detail_atts"><h4><?=$lang['quarantaine']['atts'];?>:</h4></label>
|
<label for="qid_detail_atts"><h4><?=$lang['quarantine']['atts'];?>:</h4></label>
|
||||||
<div id="qid_detail_atts">-</div>
|
<div id="qid_detail_atts">-</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -11,20 +11,20 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title"><?=$lang['quarantaine']['quarantaine'];?></h3>
|
<h3 class="panel-title"><?=$lang['quarantine']['quarantine'];?></h3>
|
||||||
</div>
|
</div>
|
||||||
<p style="margin:10px" class="help-block"><?=$lang['quarantaine']['qinfo'];?></p>
|
<p style="margin:10px" class="help-block"><?=$lang['quarantine']['qinfo'];?></p>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table id="quarantainetable" class="table table-striped"></table>
|
<table id="quarantinetable" class="table table-striped"></table>
|
||||||
</div>
|
</div>
|
||||||
<div class="mass-actions-quarantaine">
|
<div class="mass-actions-quarantine">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<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['quarantaine']['toggle_all'];?></a>
|
<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['quarantaine']['quick_actions'];?> <span class="caret"></span></a>
|
<a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['quarantine']['quick_actions'];?> <span class="caret"></span></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a id="edit_selected" data-id="qitems" data-api-url='edit/qitem' data-api-attr='{"action":"release"}' href="#"><?=$lang['quarantaine']['release'];?></a></li>
|
<li><a id="edit_selected" data-id="qitems" data-api-url='edit/qitem' data-api-attr='{"action":"release"}' href="#"><?=$lang['quarantine']['release'];?></a></li>
|
||||||
<li role="separator" class="divider"></li>
|
<li role="separator" class="divider"></li>
|
||||||
<li><a id="delete_selected" data-id="qitems" data-api-url='delete/qitem' href="#"><?=$lang['quarantaine']['remove'];?></a></li>
|
<li><a id="delete_selected" data-id="qitems" data-api-url='delete/qitem' href="#"><?=$lang['quarantine']['remove'];?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -33,11 +33,11 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|||||||
</div> <!-- /row -->
|
</div> <!-- /row -->
|
||||||
</div> <!-- /container -->
|
</div> <!-- /container -->
|
||||||
<?php
|
<?php
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/modals/quarantaine.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/modals/quarantine.php';
|
||||||
?>
|
?>
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
<?php
|
<?php
|
||||||
$lang_mailbox = json_encode($lang['quarantaine']);
|
$lang_mailbox = json_encode($lang['quarantine']);
|
||||||
echo "var lang = ". $lang_mailbox . ";\n";
|
echo "var lang = ". $lang_mailbox . ";\n";
|
||||||
echo "var csrf_token = '". $_SESSION['CSRF']['TOKEN'] . "';\n";
|
echo "var csrf_token = '". $_SESSION['CSRF']['TOKEN'] . "';\n";
|
||||||
$role = ($_SESSION['mailcow_cc_role'] == "admin") ? 'admin' : 'domainadmin';
|
$role = ($_SESSION['mailcow_cc_role'] == "admin") ? 'admin' : 'domainadmin';
|
||||||
@ -46,7 +46,7 @@ echo "var pagination_size = '". $PAGINATION_SIZE . "';\n";
|
|||||||
?>
|
?>
|
||||||
</script>
|
</script>
|
||||||
<script src="js/footable.min.js"></script>
|
<script src="js/footable.min.js"></script>
|
||||||
<script src="js/quarantaine.js"></script>
|
<script src="js/quarantine.js"></script>
|
||||||
<?php
|
<?php
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';
|
||||||
} else {
|
} else {
|
Loading…
Reference in New Issue
Block a user