diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-09-16 10:00:55 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-09-16 10:06:29 +0100 |
commit | ca18e04ce01e4c2782f1cf49a8572c03dec155cc (patch) | |
tree | 23236cefb1e12a7c6e825ba7115c3fc4fdc99961 /src/libmime | |
parent | ce1dbec019d7ab776d89884f09a55e83f5461732 (diff) | |
download | rspamd-ca18e04ce01e4c2782f1cf49a8572c03dec155cc.tar.gz rspamd-ca18e04ce01e4c2782f1cf49a8572c03dec155cc.zip |
[Minor] Add implicit header type for regexps
Diffstat (limited to 'src/libmime')
-rw-r--r-- | src/libmime/mime_expressions.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c index bd1c8cb00..bbbdaff04 100644 --- a/src/libmime/mime_expressions.c +++ b/src/libmime/mime_expressions.c @@ -433,8 +433,15 @@ rspamd_mime_expr_parse_regexp_atom (rspamd_mempool_t * pool, const gchar *line, } if (result->type >= RSPAMD_RE_MAX) { - msg_err_pool ("could not read regexp: %s, unknown type", src); - return NULL; + if (extra) { + /* Assume header regexp */ + result->extra.header = extra; + result->type = RSPAMD_RE_HEADER; + } + else { + msg_err_pool ("could not read regexp: %s, unknown type", src); + return NULL; + } } if ((result->type == RSPAMD_RE_HEADER || |