[Web] Style changes to DKIM import section, push login errors to Redis channel
parent
ace247b3b9
commit
a2f1c09a84
|
@ -231,7 +231,7 @@ $tfa_data = get_tfa();
|
||||||
<button class="btn btn-default" id="add_item" data-id="dkim" data-api-url='add/dkim' data-api-attr='{}' href="#"><span class="glyphicon glyphicon-plus"></span> <?=$lang['admin']['add'];?></button>
|
<button class="btn btn-default" id="add_item" data-id="dkim" data-api-url='add/dkim' data-api-attr='{}' href="#"><span class="glyphicon glyphicon-plus"></span> <?=$lang['admin']['add'];?></button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<legend data-target="#import_dkim" style="margin-top:40px;cursor:pointer" data-toggle="collapse">↳ <?=$lang['admin']['import_private_key'];?></legend>
|
<legend data-target="#import_dkim" style="margin-top:40px;cursor:pointer" id="import_dkim_legend" unselectable="on" data-toggle="collapse"><span id="import_dkim_arrow" class="rotate glyphicon glyphicon-menu-down"></span> <?=$lang['admin']['import_private_key'];?></legend>
|
||||||
<div id="import_dkim" class="collapse">
|
<div id="import_dkim" class="collapse">
|
||||||
<form class="form" data-id="dkim_import" role="form" method="post">
|
<form class="form" data-id="dkim_import" role="form" method="post">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -31,3 +31,14 @@ body.modal-open {
|
||||||
.inputMissingAttr {
|
.inputMissingAttr {
|
||||||
border-color: #FF4136;
|
border-color: #FF4136;
|
||||||
}
|
}
|
||||||
|
.rotate {
|
||||||
|
-moz-transition: all 0.3s linear;
|
||||||
|
-webkit-transition: all 0.3s linear;
|
||||||
|
transition: all 0.3s linear;
|
||||||
|
}
|
||||||
|
.rotate.animation {
|
||||||
|
-ms-transform:rotateX(180deg);
|
||||||
|
-moz-transform:rotateX(180deg);
|
||||||
|
-webkit-transform:rotateX(180deg);
|
||||||
|
transform:rotateX(180deg);
|
||||||
|
}
|
|
@ -92,3 +92,10 @@ body.modal-open {
|
||||||
z-index: 2000;
|
z-index: 2000;
|
||||||
}
|
}
|
||||||
.input-group-sm .btn { margin-top: 0px !important }
|
.input-group-sm .btn { margin-top: 0px !important }
|
||||||
|
legend {
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none
|
||||||
|
-o-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
|
@ -168,6 +168,7 @@ function doveadm_authenticate($hash, $algorithm, $password) {
|
||||||
}
|
}
|
||||||
function check_login($user, $pass) {
|
function check_login($user, $pass) {
|
||||||
global $pdo;
|
global $pdo;
|
||||||
|
global $redis;
|
||||||
if (!filter_var($user, FILTER_VALIDATE_EMAIL) && !ctype_alnum(str_replace(array('_', '.', '-'), '', $user))) {
|
if (!filter_var($user, FILTER_VALIDATE_EMAIL) && !ctype_alnum(str_replace(array('_', '.', '-'), '', $user))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -229,10 +230,12 @@ function check_login($user, $pass) {
|
||||||
}
|
}
|
||||||
if (!isset($_SESSION['ldelay'])) {
|
if (!isset($_SESSION['ldelay'])) {
|
||||||
$_SESSION['ldelay'] = "0";
|
$_SESSION['ldelay'] = "0";
|
||||||
|
$redis->publish("F2B_CHANNEL", "mailcow UI: Invalid password for " . $user . " by " . $_SERVER['REMOTE_ADDR']);
|
||||||
error_log("mailcow UI: Invalid password for " . $user . " by " . $_SERVER['REMOTE_ADDR']);
|
error_log("mailcow UI: Invalid password for " . $user . " by " . $_SERVER['REMOTE_ADDR']);
|
||||||
}
|
}
|
||||||
elseif (!isset($_SESSION['mailcow_cc_username'])) {
|
elseif (!isset($_SESSION['mailcow_cc_username'])) {
|
||||||
$_SESSION['ldelay'] = $_SESSION['ldelay']+0.5;
|
$_SESSION['ldelay'] = $_SESSION['ldelay']+0.5;
|
||||||
|
$redis->publish("F2B_CHANNEL", "mailcow UI: Invalid password for " . $user . " by " . $_SERVER['REMOTE_ADDR']);
|
||||||
error_log("mailcow UI: Invalid password for " . $user . " by " . $_SERVER['REMOTE_ADDR']);
|
error_log("mailcow UI: Invalid password for " . $user . " by " . $_SERVER['REMOTE_ADDR']);
|
||||||
}
|
}
|
||||||
sleep($_SESSION['ldelay']);
|
sleep($_SESSION['ldelay']);
|
||||||
|
|
|
@ -47,6 +47,10 @@ jQuery(function($){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
draw_rspamd_history();
|
draw_rspamd_history();
|
||||||
});
|
});
|
||||||
|
$("#import_dkim_legend").on('click', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
$('#import_dkim_arrow').toggleClass("animation");
|
||||||
|
});
|
||||||
function draw_postfix_logs() {
|
function draw_postfix_logs() {
|
||||||
ft_postfix_logs = FooTable.init('#postfix_log', {
|
ft_postfix_logs = FooTable.init('#postfix_log', {
|
||||||
"columns": [
|
"columns": [
|
||||||
|
|
|
@ -66,9 +66,11 @@ services:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
clamd-mailcow:
|
clamd-mailcow:
|
||||||
image: mailcow/clamd:1.0
|
image: mailcow/clamd:1.1
|
||||||
build: ./data/Dockerfiles/clamd
|
build: ./data/Dockerfiles/clamd
|
||||||
restart: always
|
restart: always
|
||||||
|
environment:
|
||||||
|
- SKIP_CLAMD=${SKIP_CLAMD:-n}
|
||||||
dns:
|
dns:
|
||||||
- 172.22.1.254
|
- 172.22.1.254
|
||||||
dns_search: mailcow-network
|
dns_search: mailcow-network
|
||||||
|
@ -143,7 +145,7 @@ services:
|
||||||
- phpfpm
|
- phpfpm
|
||||||
|
|
||||||
sogo-mailcow:
|
sogo-mailcow:
|
||||||
image: mailcow/sogo:1.0
|
image: mailcow/sogo:1.1
|
||||||
build: ./data/Dockerfiles/sogo
|
build: ./data/Dockerfiles/sogo
|
||||||
depends_on:
|
depends_on:
|
||||||
unbound-mailcow:
|
unbound-mailcow:
|
||||||
|
@ -171,7 +173,7 @@ services:
|
||||||
- sogo
|
- sogo
|
||||||
|
|
||||||
dovecot-mailcow:
|
dovecot-mailcow:
|
||||||
image: mailcow/dovecot:1.1
|
image: mailcow/dovecot:1.2
|
||||||
build: ./data/Dockerfiles/dovecot
|
build: ./data/Dockerfiles/dovecot
|
||||||
depends_on:
|
depends_on:
|
||||||
unbound-mailcow:
|
unbound-mailcow:
|
||||||
|
@ -206,7 +208,7 @@ services:
|
||||||
- dovecot
|
- dovecot
|
||||||
|
|
||||||
postfix-mailcow:
|
postfix-mailcow:
|
||||||
image: mailcow/postfix:1.0
|
image: mailcow/postfix:1.1
|
||||||
build: ./data/Dockerfiles/postfix
|
build: ./data/Dockerfiles/postfix
|
||||||
depends_on:
|
depends_on:
|
||||||
unbound-mailcow:
|
unbound-mailcow:
|
||||||
|
@ -319,7 +321,7 @@ services:
|
||||||
- acme
|
- acme
|
||||||
|
|
||||||
fail2ban-mailcow:
|
fail2ban-mailcow:
|
||||||
image: mailcow/fail2ban:1.4
|
image: mailcow/fail2ban:1.5
|
||||||
build: ./data/Dockerfiles/fail2ban
|
build: ./data/Dockerfiles/fail2ban
|
||||||
depends_on:
|
depends_on:
|
||||||
- dovecot-mailcow
|
- dovecot-mailcow
|
||||||
|
|
Loading…
Reference in New Issue