diff --git a/data/conf/rspamd/local.d/composites.conf b/data/conf/rspamd/local.d/composites.conf index 263493be..a6706f70 100644 --- a/data/conf/rspamd/local.d/composites.conf +++ b/data/conf/rspamd/local.d/composites.conf @@ -11,7 +11,7 @@ SPF_FAIL_NO_DKIM { score = 10; } SOGO_CONTACT_EXCLUDE_FWD_HOST { - expression = "WHITELISTED_FWD_HOST & ~SOGO_CONTACT"; + expression = "-WHITELISTED_FWD_HOST & ~SOGO_CONTACT"; } SOGO_CONTACT_SPOOFED { expression = "(R_SPF_PERMFAIL | R_SPF_SOFTFAIL | R_SPF_FAIL) & ~SOGO_CONTACT"; diff --git a/data/web/inc/functions.admin.inc.php b/data/web/inc/functions.admin.inc.php index 660aed69..a99d0b7a 100644 --- a/data/web/inc/functions.admin.inc.php +++ b/data/web/inc/functions.admin.inc.php @@ -23,7 +23,7 @@ function admin($_action, $_data = null) { $_SESSION['return'][] = array( 'type' => 'danger', 'log' => array(__FUNCTION__, $_action, $_data_log), - 'msg' => 'username_invalid' + 'msg' => array('username_invalid', $username) ); return false; } @@ -261,7 +261,7 @@ function admin($_action, $_data = null) { ':admin' => $_data )); $row = $stmt->fetch(PDO::FETCH_ASSOC); - if (empty($row)) { + if (empty($row)) { return false; } $admindata['username'] = $row['username']; diff --git a/data/web/inc/functions.domain_admin.inc.php b/data/web/inc/functions.domain_admin.inc.php index 00cb35fc..2fa16f59 100644 --- a/data/web/inc/functions.domain_admin.inc.php +++ b/data/web/inc/functions.domain_admin.inc.php @@ -35,7 +35,7 @@ function domain_admin($_action, $_data = null) { $_SESSION['return'][] = array( 'type' => 'danger', 'log' => array(__FUNCTION__, $_action, $_data_log), - 'msg' => 'username_invalid' + 'msg' => array('username_invalid', $username) ); return false; } @@ -44,12 +44,12 @@ function domain_admin($_action, $_data = null) { WHERE `username` = :username"); $stmt->execute(array(':username' => $username)); $num_results[] = count($stmt->fetchAll(PDO::FETCH_ASSOC)); - + $stmt = $pdo->prepare("SELECT `username` FROM `admin` WHERE `username` = :username"); $stmt->execute(array(':username' => $username)); $num_results[] = count($stmt->fetchAll(PDO::FETCH_ASSOC)); - + $stmt = $pdo->prepare("SELECT `username` FROM `domain_admins` WHERE `username` = :username"); $stmt->execute(array(':username' => $username)); @@ -379,7 +379,7 @@ function domain_admin($_action, $_data = null) { } $stmt = $pdo->query("SELECT DISTINCT `username` - FROM `domain_admins` + FROM `domain_admins` WHERE `username` IN ( SELECT `username` FROM `admin` WHERE `superadmin`!='1' @@ -415,7 +415,7 @@ function domain_admin($_action, $_data = null) { ':domain_admin' => $_data )); $row = $stmt->fetch(PDO::FETCH_ASSOC); - if (empty($row)) { + if (empty($row)) { return false; } $domainadmindata['username'] = $row['username'];