From 17a938b2aeffb3448c8d61f3d8dd7d012eb910cc Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 15 Feb 2011 18:26:27 +0300 Subject: * Add ability to specify 'S' flag to regexp that means that headers checks must be case sensitive * Add lua function message:get_header_strong --- src/expressions.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/expressions.c') 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; -- cgit v1.2.3