1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-25 02:29:32 +02:00

[Web] Mind was set to french, reverting to english

This commit is contained in:
André Peters 2018-02-08 20:13:36 +01:00
parent fae542534d
commit a50036477e
15 changed files with 130 additions and 123 deletions

View File

@ -1,5 +1,5 @@
rules {
QUARANTAINE {
QUARANTINE {
backend = "http";
url = "http://nginx:9081/pipe.php";
selector = "is_reject";

View File

@ -133,12 +133,12 @@ foreach (json_decode($rcpts, true) as $rcpt) {
// Loop through all found gotos
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->execute(array(':goto' => $goto));
$username = $stmt->fetch(PDO::FETCH_ASSOC)['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
if (!in_array($username, $rcpt_final_mailboxes)) {
$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->execute(array(':goto' => $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);
}
}
@ -173,7 +173,7 @@ foreach (json_decode($rcpts, true) as $rcpt) {
// Force exit if loop cannot be solved
// Postfix does not allow for alias loops, so this should never happen.
$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) {
@ -184,9 +184,9 @@ foreach (json_decode($rcpts, true) 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 {
$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)");
$stmt->execute(array(
':qid' => $qid,
@ -199,11 +199,11 @@ foreach ($rcpt_final_mailboxes as $rcpt) {
':msg' => $raw_data,
':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`
FROM (
SELECT `id`
FROM `quarantaine`
FROM `quarantine`
WHERE `rcpt` = :rcpt2
ORDER BY id DESC
LIMIT :retention_size

View File

@ -147,7 +147,7 @@ $tfa_data = get_tfa();
<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="#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="#top" class="list-group-item" style="border-top:1px dashed #dadada"> <?=$lang['admin']['to_top'];?></a>
</div>
@ -414,28 +414,28 @@ $tfa_data = get_tfa();
</div>
</div>
<span class="anchor" id="quarantaine"></span>
<span class="anchor" id="quarantine"></span>
<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">
<?php $q_data = quarantaine('settings'); ?>
<form class="form" data-id="quarantaine" role="form" method="post">
<?php $q_data = quarantine('settings'); ?>
<form class="form" data-id="quarantine" role="form" method="post">
<div class="row">
<div class="col-sm-6">
<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>
</div>
</div>
<div class="col-sm-6">
<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>
</div>
</div>
</div>
<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>
<?php
foreach (array_merge(mailbox('get', 'domains'), mailbox('get', 'alias_domains')) as $domain):
@ -446,7 +446,7 @@ $tfa_data = get_tfa();
?>
</select>
</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>
</div>
</div>

View File

@ -28,10 +28,10 @@ table.footable>tbody>tr.footable-empty>td {
width: 80%;
}
}
.mass-actions-quarantaine {
.mass-actions-Quarantine {
user-select: none;
padding:10px 0 10px 10px;
}
.inputMissingAttr {
border-color: #FF4136;
}
}

View File

@ -23,7 +23,7 @@ function rrmdir($src) {
}
if (!empty($_GET['id']) && ctype_alnum($_GET['id'])) {
$tmpdir = '/tmp/' . $_GET['id'] . '/';
$mailc = quarantaine('details', $_GET['id']);
$mailc = quarantine('details', $_GET['id']);
if (strlen($mailc['msg']) > 10485760) {
echo json_encode(array('error' => 'Message size exceeds 10 MiB.'));
exit;

View File

@ -1,5 +1,5 @@
<?php
function quarantaine($_action, $_data = null) {
function quarantine($_action, $_data = null) {
global $pdo;
global $redis;
global $lang;
@ -12,7 +12,7 @@ function quarantaine($_action, $_data = null) {
else {
$ids = $_data['id'];
}
if (!isset($_SESSION['acl']['quarantaine']) || $_SESSION['acl']['quarantaine'] != "1" ) {
if (!isset($_SESSION['acl']['quarantine']) || $_SESSION['acl']['quarantine'] != "1" ) {
$_SESSION['return'] = array(
'type' => 'danger',
'msg' => sprintf($lang['danger']['access_denied'])
@ -28,12 +28,12 @@ function quarantaine($_action, $_data = null) {
return false;
}
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));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
if (hasMailboxObjectAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $row['rcpt'])) {
try {
$stmt = $pdo->prepare("DELETE FROM `quarantaine` WHERE `id` = :id");
$stmt = $pdo->prepare("DELETE FROM `quarantine` WHERE `id` = :id");
$stmt->execute(array(
':id' => $id
));
@ -67,7 +67,7 @@ function quarantaine($_action, $_data = null) {
);
break;
case 'edit':
if (!isset($_SESSION['acl']['quarantaine']) || $_SESSION['acl']['quarantaine'] != "1" ) {
if (!isset($_SESSION['acl']['quarantine']) || $_SESSION['acl']['quarantine'] != "1" ) {
$_SESSION['return'] = array(
'type' => 'danger',
'msg' => sprintf($lang['danger']['access_denied'])
@ -121,7 +121,7 @@ function quarantaine($_action, $_data = null) {
return false;
}
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));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
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->setFrom($sender);
$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->IsHTML(false);
$msg_tmpf = tempnam("/tmp", $row['qid']);
file_put_contents($msg_tmpf, $row['msg']);
$mail->addAttachment($msg_tmpf, $row['qid'] . '.eml');
$mail->Body = sprintf($lang['quarantaine']['release_body']);
$mail->Body = sprintf($lang['quarantine']['release_body']);
$mail->send();
unlink($msg_tmpf);
}
@ -186,7 +186,7 @@ function quarantaine($_action, $_data = null) {
return false;
}
try {
$stmt = $pdo->prepare("DELETE FROM `quarantaine` WHERE `id` = :id");
$stmt = $pdo->prepare("DELETE FROM `quarantine` WHERE `id` = :id");
$stmt->execute(array(
':id' => $id
));
@ -209,7 +209,7 @@ function quarantaine($_action, $_data = null) {
case 'get':
try {
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']));
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
while($row = array_shift($rows)) {
@ -217,7 +217,7 @@ function quarantaine($_action, $_data = null) {
}
}
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);
while($row = array_shift($rows)) {
$q_meta[] = $row;
@ -226,7 +226,7 @@ function quarantaine($_action, $_data = null) {
else {
$domains = array_merge(mailbox('get', 'domains'), mailbox('get', 'alias_domains'));
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 . '$'));
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
while($row = array_shift($rows)) {
@ -270,7 +270,7 @@ function quarantaine($_action, $_data = null) {
return false;
}
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));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
if (hasMailboxObjectAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $row['rcpt'])) {
@ -287,4 +287,4 @@ function quarantaine($_action, $_data = null) {
return false;
break;
}
}
}

View File

@ -30,7 +30,7 @@
<?= (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("/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; ?>
<link rel="shortcut icon" href="/favicon.png" type="image/png">
<link rel="icon" href="/favicon.png" type="image/png">
@ -96,7 +96,7 @@
<?php
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
}
if ($_SESSION['mailcow_cc_role'] == 'admin') {

View File

@ -3,7 +3,7 @@ function init_db_schema() {
try {
global $pdo;
$db_version = "08022018_1219";
$db_version = "08022018_2019";
$stmt = $pdo->query("SHOW TABLES LIKE 'versions'");
$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"
),
"quarantaine" => array(
"quarantine" => array(
"cols" => array(
"id" => "INT NOT NULL AUTO_INCREMENT",
"qid" => "VARCHAR(30) NOT NULL",
@ -244,7 +244,7 @@ function init_db_schema() {
"syncjobs" => "TINYINT(1) NOT NULL DEFAULT '1'",
"eas_reset" => "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'",
"recipient_maps" => "TINYINT(1) NOT NULL DEFAULT '0'",
),
@ -621,7 +621,14 @@ function init_db_schema() {
);
foreach ($tables as $table => $properties) {
$stmt = $pdo->query("SHOW TABLES LIKE '" . $table . "'");
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 . "'");
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
if ($num_results != 0) {
$stmt = $pdo->prepare("SELECT CONCAT('ALTER TABLE ', `table_schema`, '.', `table_name`, ' DROP FOREIGN KEY ', `constraint_name`, ';') AS `FKEY_DROP` FROM `information_schema`.`table_constraints`

View File

@ -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.address_rewriting.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.dkim.inc.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.fwdhost.inc.php';

View File

@ -6,8 +6,8 @@ jQuery(function($){
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 draw_quarantaine_table() {
ft_quarantainetable = FooTable.init('#quarantainetable', {
function draw_quarantine_table() {
ft_quarantinetable = FooTable.init('#quarantinetable', {
"columns": [
{"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"}},
@ -19,10 +19,10 @@ jQuery(function($){
],
"rows": $.ajax({
dataType: 'json',
url: '/api/v1/get/quarantaine/all',
url: '/api/v1/get/quarantine/all',
jsonp: false,
error: function () {
console.log('Cannot draw quarantaine table');
console.log('Cannot draw quarantine table');
},
success: function (data) {
$.each(data, function (i, item) {
@ -38,14 +38,14 @@ jQuery(function($){
"paging": {"enabled": true,"limit": 5,"size": pagination_size},
"sorting": {"enabled": true},
"on": {
"ready.ft.table": btn_group_quarantaine,
"after.ft.paging": btn_group_quarantaine
"ready.ft.table": btn_group_quarantine,
"after.ft.paging": btn_group_quarantine
},
"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) {
e.preventDefault();
var qitem = $(this).data('item');
@ -80,5 +80,5 @@ jQuery(function($){
})
}
// Initial table drawings
draw_quarantaine_table();
draw_quarantine_table();
});

View File

@ -1386,11 +1386,11 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
break;
}
break;
case "quarantaine":
case "quarantine":
// "all" will not print details
switch ($object) {
case "all":
$data = quarantaine('get');
$data = quarantine('get');
if (!isset($data) || empty($data)) {
echo '{}';
}
@ -1399,7 +1399,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
}
break;
default:
$data = quarantaine('details', $object);
$data = quarantine('details', $object);
if (!isset($data) || empty($data)) {
echo '{}';
}
@ -1729,7 +1729,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
if (isset($_POST['items'])) {
$items = (array)json_decode($_POST['items'], true);
if (is_array($items)) {
if (quarantaine('delete', array('id' => $items)) === false) {
if (quarantine('delete', array('id' => $items)) === false) {
if (isset($_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);
$postarray = array_merge(array('id' => $items), $attr);
if (is_array($postarray['id'])) {
if (quarantaine('edit', $postarray) === false) {
if (quarantine('edit', $postarray) === false) {
if (isset($_SESSION['return'])) {
echo json_encode($_SESSION['return']);
}
@ -2653,11 +2653,11 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
));
}
break;
case "quarantaine":
case "quarantine":
// Edit settings, does not need IDs
if (isset($_POST['attr'])) {
$postarray = json_decode($_POST['attr'], true);
if (quarantaine('edit', $postarray) === false) {
if (quarantine('edit', $postarray) === false) {
if (isset($_SESSION['return'])) {
echo json_encode($_SESSION['return']);
}

View File

@ -625,32 +625,32 @@ $lang['success']['reset_main_logo'] = "Standardgrafik wurde wiederhergestellt";
$lang['success']['items_released'] = "Ausgewählte Objekte wurden an Mailbox versendet";
$lang['danger']['imagick_exception'] = "Fataler Bildverarbeitungsfehler";
$lang['quarantaine']['quarantaine'] = "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['quarantaine']['release'] = "Freigeben";
$lang['quarantaine']['empty'] = 'Keine Einträge';
$lang['quarantaine']['toggle_all'] = 'Alle auswählen';
$lang['quarantaine']['quick_actions'] = 'Aktionen';
$lang['quarantaine']['remove'] = 'Entfernen';
$lang['quarantaine']['received'] = "Empfangen";
$lang['quarantaine']['action'] = "Aktion";
$lang['quarantaine']['rcpt'] = "Empfänger";
$lang['quarantaine']['qid'] = "Rspamd QID";
$lang['quarantaine']['sender'] = "Sender";
$lang['quarantaine']['show_item'] = "Details";
$lang['quarantaine']['check_hash'] = "Checksumme auf VirusTotal suchen";
$lang['quarantaine']['qitem'] = "Quarantäneeintrag";
$lang['quarantaine']['subj'] = "Betreff";
$lang['quarantaine']['text_plain_content'] = "Inhalt (text/plain)";
$lang['quarantaine']['text_from_html_content'] = "Inhalt (html, konvertiert)";
$lang['quarantaine']['atts'] = "Anhänge";
$lang['quarantine']['quarantine'] = "Quarantäne";
$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['quarantine']['release'] = "Freigeben";
$lang['quarantine']['empty'] = 'Keine Einträge';
$lang['quarantine']['toggle_all'] = 'Alle auswählen';
$lang['quarantine']['quick_actions'] = 'Aktionen';
$lang['quarantine']['remove'] = 'Entfernen';
$lang['quarantine']['received'] = "Empfangen";
$lang['quarantine']['action'] = "Aktion";
$lang['quarantine']['rcpt'] = "Empfänger";
$lang['quarantine']['qid'] = "Rspamd QID";
$lang['quarantine']['sender'] = "Sender";
$lang['quarantine']['show_item'] = "Details";
$lang['quarantine']['check_hash'] = "Checksumme auf VirusTotal suchen";
$lang['quarantine']['qitem'] = "Quarantäneeintrag";
$lang['quarantine']['subj'] = "Betreff";
$lang['quarantine']['text_plain_content'] = "Inhalt (text/plain)";
$lang['quarantine']['text_from_html_content'] = "Inhalt (html, konvertiert)";
$lang['quarantine']['atts'] = "Anhänge";
$lang['header']['quarantaine'] = "Quarantäne";
$lang['header']['quarantine'] = "Quarantäne";
$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['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_type'] = "BCC Typ";
@ -676,4 +676,4 @@ $lang['mailbox']['sender_maps'] = 'Senderumschreibungen';
$lang['mailbox']['sender_map_info'] = 'Senderumschreibungen werden verwendet, um den Absender einer E-Mail noch vor dem Versand umzuschreiben.';
$lang['mailbox']['sender_map_old'] = 'Original Absender';
$lang['mailbox']['sender_map_new'] = 'Neuer Absender';
$lang['mailbox']['add_sender_map_entry'] = 'Senderumschreibung hinzufügen';
$lang['mailbox']['add_sender_map_entry'] = 'Senderumschreibung hinzufügen';

View File

@ -576,10 +576,10 @@ $lang['admin']['api_key'] = "API key";
$lang['admin']['activate_api'] = "Activate API";
$lang['admin']['regen_api_key'] = "Regenerate API key";
$lang['admin']['quarantaine'] = "Quarantine";
$lang['admin']['quarantaine_retention_size'] = "Retentions per mailbox:";
$lang['admin']['quarantaine_max_size'] = "Maximum size in MiB (larger elements are discarded):";
$lang['admin']['quarantaine_exclude_domains'] = "Exclude domains and alias-domains:";
$lang['admin']['quarantine'] = "Quarantine";
$lang['admin']['quarantine_retention_size'] = "Retentions per mailbox:";
$lang['admin']['quarantine_max_size'] = "Maximum size in MiB (larger elements are discarded):";
$lang['admin']['quarantine_exclude_domains'] = "Exclude domains and alias-domains:";
$lang['admin']['ui_texts'] = "UI labels and texts";
$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['danger']['imagick_exception'] = "Error: Imagick exception while reading image";
$lang['quarantaine']['quarantaine'] = "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['quarantaine']['release'] = "Release";
$lang['quarantaine']['empty'] = 'No results';
$lang['quarantaine']['toggle_all'] = 'Toggle all';
$lang['quarantaine']['quick_actions'] = 'Actions';
$lang['quarantaine']['remove'] = 'Remove';
$lang['quarantaine']['received'] = "Received";
$lang['quarantaine']['action'] = "Action";
$lang['quarantaine']['rcpt'] = "Recipient";
$lang['quarantaine']['qid'] = "Rspamd QID";
$lang['quarantaine']['sender'] = "Sender";
$lang['quarantaine']['show_item'] = "Show item";
$lang['quarantaine']['check_hash'] = "Search file hash @ VT";
$lang['quarantaine']['qitem'] = "Quarantine item";
$lang['quarantaine']['subj'] = "Subject";
$lang['quarantaine']['text_plain_content'] = "Content (text/plain)";
$lang['quarantaine']['text_from_html_content'] = "Content (converted html)";
$lang['quarantaine']['atts'] = "Attachments";
$lang['quarantine']['quarantine'] = "Quarantine";
$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['quarantine']['release'] = "Release";
$lang['quarantine']['empty'] = 'No results';
$lang['quarantine']['toggle_all'] = 'Toggle all';
$lang['quarantine']['quick_actions'] = 'Actions';
$lang['quarantine']['remove'] = 'Remove';
$lang['quarantine']['received'] = "Received";
$lang['quarantine']['action'] = "Action";
$lang['quarantine']['rcpt'] = "Recipient";
$lang['quarantine']['qid'] = "Rspamd QID";
$lang['quarantine']['sender'] = "Sender";
$lang['quarantine']['show_item'] = "Show item";
$lang['quarantine']['check_hash'] = "Search file hash @ VT";
$lang['quarantine']['qitem'] = "Quarantine item";
$lang['quarantine']['subj'] = "Subject";
$lang['quarantine']['text_plain_content'] = "Content (text/plain)";
$lang['quarantine']['text_from_html_content'] = "Content (converted html)";
$lang['quarantine']['atts'] = "Attachments";
$lang['header']['quarantaine'] = "Quarantine";
$lang['header']['quarantine'] = "Quarantine";
$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['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_type'] = "BCC type";
@ -671,4 +671,4 @@ $lang['mailbox']['sender_maps'] = 'Sender maps';
$lang['mailbox']['sender_map_info'] = 'Sender maps are used to replace the sender address on a message before it is sent.';
$lang['mailbox']['sender_map_old'] = 'Original sender';
$lang['mailbox']['sender_map_new'] = 'New sender';
$lang['mailbox']['add_sender_map_entry'] = 'Add sender map';
$lang['mailbox']['add_sender_map_entry'] = 'Add sender map';

View File

@ -9,24 +9,24 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
<div class="modal-content">
<div class="modal-header">
<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 class="modal-body">
<div id="qid_error" style="display:none" class="alert alert-danger"></div>
<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>
</div>
<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>
</div>
<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>
</div>
<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>
</div>

View File

@ -11,20 +11,20 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><?=$lang['quarantaine']['quarantaine'];?></h3>
<h3 class="panel-title"><?=$lang['quarantine']['quarantine'];?></h3>
</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">
<table id="quarantainetable" class="table table-striped"></table>
<table id="quarantinetable" class="table table-striped"></table>
</div>
<div class="mass-actions-quarantaine">
<div class="mass-actions-quarantine">
<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 dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['quarantaine']['quick_actions'];?> <span class="caret"></span></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['quarantine']['quick_actions'];?> <span class="caret"></span></a>
<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><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>
</div>
</div>
@ -33,11 +33,11 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
</div> <!-- /row -->
</div> <!-- /container -->
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/modals/quarantaine.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/modals/quarantine.php';
?>
<script type='text/javascript'>
<?php
$lang_mailbox = json_encode($lang['quarantaine']);
$lang_mailbox = json_encode($lang['quarantine']);
echo "var lang = ". $lang_mailbox . ";\n";
echo "var csrf_token = '". $_SESSION['CSRF']['TOKEN'] . "';\n";
$role = ($_SESSION['mailcow_cc_role'] == "admin") ? 'admin' : 'domainadmin';
@ -46,7 +46,7 @@ echo "var pagination_size = '". $PAGINATION_SIZE . "';\n";
?>
</script>
<script src="js/footable.min.js"></script>
<script src="js/quarantaine.js"></script>
<script src="js/quarantine.js"></script>
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';
} else {