aboutsummaryrefslogtreecommitdiffstats
path: root/src/expressions.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-02-15 18:26:27 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-02-15 18:26:27 +0300
commit17a938b2aeffb3448c8d61f3d8dd7d012eb910cc (patch)
tree066cebe8b625a8b728ba17f1b3be8f2e80dce9c1 /src/expressions.c
parentbeab78097de6a53430bb16310e41b93d74546cb9 (diff)
downloadrspamd-17a938b2aeffb3448c8d61f3d8dd7d012eb910cc.tar.gz
rspamd-17a938b2aeffb3448c8d61f3d8dd7d012eb910cc.zip
* Add ability to specify 'S' flag to regexp that means that headers checks must be case sensitive
* Add lua function message:get_header_strong
Diffstat (limited to 'src/expressions.c')
-rw-r--r--src/expressions.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/expressions.c b/src/expressions.c
index c3b45ef7c..87ce59337 100644
--- a/src/expressions.c
+++ b/src/expressions.c
@@ -245,6 +245,7 @@ is_regexp_flag (gchar a)
case 'U':
case 'X':
case 'T':
+ case 'S':
return TRUE;
default:
return FALSE;
@@ -680,6 +681,10 @@ parse_regexp (memory_pool_t * pool, gchar *line, gboolean raw_mode)
result->is_test = TRUE;
p ++;
break;
+ case 'S':
+ result->is_strong = TRUE;
+ p ++;
+ break;
/* Stop flags parsing */
default:
p = NULL;
@@ -913,7 +918,7 @@ rspamd_header_exists (struct worker_task * task, GList * args, void *unused)
}
debug_task ("try to get header %s", (gchar *)arg->data);
- headerlist = message_get_header (task->task_pool, task->message, (gchar *)arg->data);
+ headerlist = message_get_header (task->task_pool, task->message, (gchar *)arg->data, FALSE);
if (headerlist) {
g_list_free (headerlist);
return TRUE;