mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-07-21 01:07:49 +00:00
Fixes: First line was missing in logs. Adds support for Fail2ban container
This commit is contained in:
parent
b8e9b3d879
commit
c75ce5124c
4 changed files with 85 additions and 3 deletions
|
|
@ -480,6 +480,21 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
|
|||
echo '{}';
|
||||
}
|
||||
break;
|
||||
case "fail2ban":
|
||||
if (isset($extra) && !empty($extra)) {
|
||||
$extra = intval($extra);
|
||||
$logs = get_logs('fail2ban-mailcow', $extra);
|
||||
}
|
||||
else {
|
||||
$logs = get_logs('fail2ban-mailcow', -1);
|
||||
}
|
||||
if (isset($logs) && !empty($logs)) {
|
||||
echo json_encode($logs, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
|
||||
}
|
||||
else {
|
||||
echo '{}';
|
||||
}
|
||||
break;
|
||||
case "postfix":
|
||||
if (isset($extra) && !empty($extra)) {
|
||||
$extra = intval($extra);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue