diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-27 18:30:40 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-27 18:30:40 +0300 |
commit | 89a83f2ef6c2358fe45faac5b15da6344fa7728c (patch) | |
tree | 54afb9d99c14830db4aef6a0490a92b82c1cd089 /src/filter.c | |
parent | 4e3304bed44a8c275710db3d7ae7387430a52193 (diff) | |
download | rspamd-89a83f2ef6c2358fe45faac5b15da6344fa7728c.tar.gz rspamd-89a83f2ef6c2358fe45faac5b15da6344fa7728c.zip |
* Add initial LUA filters support
Diffstat (limited to 'src/filter.c')
-rw-r--r-- | src/filter.c | 18 |
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 |