andryyy 2019-11-11 08:21:20 +01:00
commit fe1e9f3d15
3 changed files with 8 additions and 8 deletions

View File

@ -11,7 +11,7 @@ SPF_FAIL_NO_DKIM {
score = 10; score = 10;
} }
SOGO_CONTACT_EXCLUDE_FWD_HOST { SOGO_CONTACT_EXCLUDE_FWD_HOST {
expression = "WHITELISTED_FWD_HOST & ~SOGO_CONTACT"; expression = "-WHITELISTED_FWD_HOST & ~SOGO_CONTACT";
} }
SOGO_CONTACT_SPOOFED { SOGO_CONTACT_SPOOFED {
expression = "(R_SPF_PERMFAIL | R_SPF_SOFTFAIL | R_SPF_FAIL) & ~SOGO_CONTACT"; expression = "(R_SPF_PERMFAIL | R_SPF_SOFTFAIL | R_SPF_FAIL) & ~SOGO_CONTACT";

View File

@ -23,7 +23,7 @@ function admin($_action, $_data = null) {
$_SESSION['return'][] = array( $_SESSION['return'][] = array(
'type' => 'danger', 'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log), 'log' => array(__FUNCTION__, $_action, $_data_log),
'msg' => 'username_invalid' 'msg' => array('username_invalid', $username)
); );
return false; return false;
} }
@ -261,7 +261,7 @@ function admin($_action, $_data = null) {
':admin' => $_data ':admin' => $_data
)); ));
$row = $stmt->fetch(PDO::FETCH_ASSOC); $row = $stmt->fetch(PDO::FETCH_ASSOC);
if (empty($row)) { if (empty($row)) {
return false; return false;
} }
$admindata['username'] = $row['username']; $admindata['username'] = $row['username'];

View File

@ -35,7 +35,7 @@ function domain_admin($_action, $_data = null) {
$_SESSION['return'][] = array( $_SESSION['return'][] = array(
'type' => 'danger', 'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log), 'log' => array(__FUNCTION__, $_action, $_data_log),
'msg' => 'username_invalid' 'msg' => array('username_invalid', $username)
); );
return false; return false;
} }
@ -44,12 +44,12 @@ function domain_admin($_action, $_data = null) {
WHERE `username` = :username"); WHERE `username` = :username");
$stmt->execute(array(':username' => $username)); $stmt->execute(array(':username' => $username));
$num_results[] = count($stmt->fetchAll(PDO::FETCH_ASSOC)); $num_results[] = count($stmt->fetchAll(PDO::FETCH_ASSOC));
$stmt = $pdo->prepare("SELECT `username` FROM `admin` $stmt = $pdo->prepare("SELECT `username` FROM `admin`
WHERE `username` = :username"); WHERE `username` = :username");
$stmt->execute(array(':username' => $username)); $stmt->execute(array(':username' => $username));
$num_results[] = count($stmt->fetchAll(PDO::FETCH_ASSOC)); $num_results[] = count($stmt->fetchAll(PDO::FETCH_ASSOC));
$stmt = $pdo->prepare("SELECT `username` FROM `domain_admins` $stmt = $pdo->prepare("SELECT `username` FROM `domain_admins`
WHERE `username` = :username"); WHERE `username` = :username");
$stmt->execute(array(':username' => $username)); $stmt->execute(array(':username' => $username));
@ -379,7 +379,7 @@ function domain_admin($_action, $_data = null) {
} }
$stmt = $pdo->query("SELECT DISTINCT $stmt = $pdo->query("SELECT DISTINCT
`username` `username`
FROM `domain_admins` FROM `domain_admins`
WHERE `username` IN ( WHERE `username` IN (
SELECT `username` FROM `admin` SELECT `username` FROM `admin`
WHERE `superadmin`!='1' WHERE `superadmin`!='1'
@ -415,7 +415,7 @@ function domain_admin($_action, $_data = null) {
':domain_admin' => $_data ':domain_admin' => $_data
)); ));
$row = $stmt->fetch(PDO::FETCH_ASSOC); $row = $stmt->fetch(PDO::FETCH_ASSOC);
if (empty($row)) { if (empty($row)) {
return false; return false;
} }
$domainadmindata['username'] = $row['username']; $domainadmindata['username'] = $row['username'];