aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-05-03 18:46:33 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-05-03 18:46:33 +0400
commit56586078f92c4cf71fad46e1f4888a49749a6313 (patch)
tree2fb287deee5258397464003c445cd2ede0a84d49
parenta855afa14958249eb46e5ace213f02673ecbc9e5 (diff)
downloadrspamd-56586078f92c4cf71fad46e1f4888a49749a6313.tar.gz
rspamd-56586078f92c4cf71fad46e1f4888a49749a6313.zip
* Whitelist settings now affects on metric's action
-rw-r--r--src/settings.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/settings.c b/src/settings.c
index 65dea078e..af4c37b80 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -456,7 +456,13 @@ check_metric_action_settings (struct worker_task *task, struct metric *metric, d
if (check_setting (task, &us, &ds)) {
if (us != NULL) {
+ /* Check whitelist and set appropriate action for whitelisted users */
+ if (check_whitelist(task, us)) {
+ *result = METRIC_ACTION_NOACTION;
+ return TRUE;
+ }
if ((cur = g_hash_table_lookup (us->metric_actions, metric->name)) != NULL) {
+
while (cur) {
act = cur->data;
if (score >= act->score) {
@@ -467,6 +473,11 @@ check_metric_action_settings (struct worker_task *task, struct metric *metric, d
}
}
else if (ds != NULL) {
+ /* Check whitelist and set appropriate action for whitelisted users */
+ if (check_whitelist(task, ds)) {
+ *result = METRIC_ACTION_NOACTION;
+ return TRUE;
+ }
if ((cur = g_hash_table_lookup (ds->metric_actions, metric->name)) != NULL) {
while (cur) {
act = cur->data;