summaryrefslogtreecommitdiffstats
path: root/src/filter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/filter.c')
-rw-r--r--src/filter.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/filter.c b/src/filter.c
index 801b2f8bb..a1679d499 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -40,6 +40,9 @@
#ifndef WITHOUT_PERL
#include "perl.h"
#endif
+#ifdef WITH_LUA
+#include "lua-rspamd.h"
+#endif
void
insert_result (struct worker_task *task, const char *metric_name, const char *symbol, double flag, GList *opts)
@@ -186,6 +189,21 @@ call_filter_by_name (struct worker_task *task, const char *name, enum filter_typ
perl_call_message_filter (name, task);
break;
}
+#elif defined(WITH_LUA)
+ switch (sc_type) {
+ case SCRIPT_HEADER:
+ lua_call_header_filter (name, task);
+ break;
+ case SCRIPT_MIME:
+ lua_call_mime_filter (name, task);
+ break;
+ case SCRIPT_URL:
+ lua_call_url_filter (name, task);
+ break;
+ case SCRIPT_MESSAGE:
+ lua_call_message_filter (name, task);
+ break;
+ }
#else
msg_err ("call_filter_by_name: trying to call perl function while perl support is disabled %s", name);
#endif