1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2026-02-10 06:21:38 +00:00

[DockerApi] Rename DockerApi to Controller and add mailcow-adm tool

This commit is contained in:
FreddleSpl0it
2025-07-29 12:33:43 +02:00
parent d5b30a7a08
commit 0ac0e5c252
53 changed files with 3449 additions and 79 deletions

View File

@@ -488,6 +488,16 @@ function sys_mail($_data) {
'msg' => 'Mass mail job completed, sent ' . count($rcpts) . ' mails'
);
}
function get_remote_ip($use_x_real_ip = true) {
$remote = $_SERVER['REMOTE_ADDR'];
if ($use_x_real_ip && !empty($_SERVER['HTTP_X_REAL_IP'])) {
$remote = $_SERVER['HTTP_X_REAL_IP'];
}
if (filter_var($remote, FILTER_VALIDATE_IP) === false) {
$remote = '0.0.0.0';
}
return $remote;
}
function logger($_data = false) {
/*
logger() will be called as last function