]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Rework] MIME detection via Lua Magic; enforce cfg in Lua task API
authorVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 15 Sep 2025 18:44:37 +0000 (19:44 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 15 Sep 2025 18:44:37 +0000 (19:44 +0100)
commit9be7a2598efa3f3d138ae07b29213d1c976078a8
treeb7b97c10cfe9ade4dfec873e0bee3d59510978da
parent01b74b420cc61463a0bad99c43b8a1d5a7c79c05
[Rework] MIME detection via Lua Magic; enforce cfg in Lua task API

- Add rspamd_mime_parser_config on cfg; remove global state and lazy init
- Initialize parser config once per cfg; preload lua_magic.detect_mime_part
- Always run detection after normal part parse; promote .eml/message parts
- Preserve detected_ext/detected_ct/detected_type and NO_TEXT flag
- Remove duplicate detection from message.c; add debug logs
- Restore CTE parsing API and fix call sites
- Enforce cfg requirement in rspamd_task.load_from_string/load_from_file/create
- Fix unit tests to pass rspamd_config to load_from_string
lualib/lua_magic/heuristics.lua
lualib/lua_magic/patterns.lua
lualib/lua_magic/types.lua
src/libmime/archives.c
src/libmime/images.c
src/libmime/message.c
src/libmime/mime_parser.c
src/libmime/mime_parser.h
src/libserver/cfg_utils.cxx