]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Feature] Improve MIME anonymization with LLM support and enhanced privacy
authorVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 16 Oct 2025 16:56:27 +0000 (17:56 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 17 Oct 2025 07:49:02 +0000 (08:49 +0100)
commitd3a18758f6d74123dc2c9cdffa6420dad78ad57c
tree04b2bb8edae5d9b47f00714c47b7008b0c83f118
parent3d2f543ed8d507ac261552f97cbe25935902dc61
[Feature] Improve MIME anonymization with LLM support and enhanced privacy

- Add Claude/Anthropic API support alongside OpenAI and Ollama
- Add LLM-based subject line anonymization with context-aware prompts
- Remove privacy-sensitive headers: DKIM, ARC, X-Spamd-Result, Return-Path, Delivered-To
- Anonymize recipient addresses in Received header 'for' clauses
- Add comprehensive debug logging throughout anonymization process
- Support per-model parameter configuration for flexible API usage
- Fix error handling to properly exit on anonymization failure
- Add finish_reason analysis for detecting truncated LLM responses
- Improve default LLM prompt for better anonymization quality
lualib/lua_mime.lua
lualib/rspamadm/mime.lua