Skip to content

Releases

Release 4.3.1

Choose a tag to compare

@vstakhov vstakhov released this 22 Nov 20:25
73b8fe1

Incompatible changes

  • Dynamic configuration: dynamic scores and actions moved to dynconf. The legacy dynamic configuration file and Redis hash are imported once, and the file is renamed afterwards. The dynamic_conf plugin is now a stub for the dynconf Redis backend. A threshold in override.d wins over a dynamic one, and a dynamic one wins over local.d
  • Time intervals: lua_util parses intervals strictly. "500ms" now means milliseconds, and "1 d" and "1D" both mean a day. Unknown units and trailing text are rejected
  • URL order: URL hash sets are seeded with a random value per process, so unsorted task urls come out in a different order in each process

Features

  • dynconf: a new framework for runtime overrides of plugin options, with Redis and file backends. By default the file backend serves actions, scores and symbols. Scalar options of chartable, dkim and fuzzy_check are dynamic, and so are the runtime options of 41 Lua plugins. rspamadm configdump --dynamic and new controller endpoints dump, set, reset and reload overrides
  • Symbol profiling: symcache times selected symbols and groups precisely on every scan. The timings are read through rspamd_config:register_profiled_symbols() and task:get_symbols_profile(). The new lua_task_profile library samples per-scan symbol run times, and the clickhouse plugin stores the samples in new Profile columns (schema version 13)
  • DKIM: beyond max_sigs, up to extra_aligned_sigs (2 by default) signatures aligned with From are checked. DKIM_SIGS_TRUNCATED is added when signatures are left unchecked
  • RBL: new hash_format = "rbase32" (RFC 4648 base32), and selector_hash = false for selectors that already return a hash. max_dns_requests caps DNS requests per message for each rule. When work is dropped, a <SYMBOL>_LIMIT symbol with a zero score is added
  • Version and WebUI: --version, rspamd_version() and the controller stat reply show the release base and the git distance from it. The WebUI uses Bootstrap 5.3.9

Bug fixes

  • Critical: the RPM package creates the _rspamd user on RHEL again. Fresh EL8/9/10 installs had no such user

  • DKIM, SPF and phishing: one unresolved signature no longer hides every DKIM result. Before this, an untrusted signature with trusted_only or a d= label over 63 octets suppressed all DKIM symbols. A key request that cannot be sent is a temporary error unless the name is invalid. SPF reports a malformed domain as none, not as a DNS failure, so a spoofed sender now gets the DMARC reject policy instead of DMARC_DNSFAIL. A link that displays the DMARC-authenticated From domain scores as PHISHING_OWN_DOMAIN instead of PHISHING. This does not apply to shared_domains (freemail) or strict domains

  • Randomness: forked workers reseed math.random and the fast PRNG. Before this, all workers drew the same random sequences. libottery seeds from getrandom/getentropy first and never from RDRAND alone, and a failed reinit no longer leaves it usable. After a refill it wipes the bytes it actually handed out; up to 40 bytes of a returned key used to stay in the state

  • Scanners: clamav treats a reply without a verdict as a failure. A database reload used to let the message pass as scanned. savapi, spamassassin, oletools, fprot, avast, razor, pyzor, dcc and sophos no longer treat error or unrecognised replies as clean

  • Lua TCP, SMTP and timers: lua_tcp fixes:

    • use-after-free on error callbacks, closing sessions and stale handles
    • aborts on empty write handlers, and a callback called by mistake on a failed connect
    • timeouts for sync operations, draining decrypted TLS data, and starttls failures reported only through the handlers

    lua_smtp calls the completion callback once on an immediate failure. Callbacks of task:add_timer and ev_base:add_timer run on a callback thread, and a timer that returns a new interval is re-armed. Before this, the worker aborted or timers stopped firing

  • Lua API and runtime: Lua stack and memory errors are fixed in the task, config, util, mempool, map, trie, html, upstream and ucl APIs. Stack errors are also fixed in the Redis learn cache, mime expression atoms, fuzzy learn, legacy autolearn and classifier conditions. map:foreach now stops when the callback returns true and returns the count. Trie callbacks always get the end offset. Every section of the global config table is imported; three of them used to abort rspamd. Tracebacks keep the Lua error message with Lua 5.4.3 and later. lua_mime compiles with Lua 5.5, and lua_shape keeps false as a field default. rspamadm fixes the lua -P abort, the exit status of a failing Lua command and thread reuse in .exec

  • Maps, parsing and rules: maps keep the expiry of each HTTP backend and check all backends before a reread. Before this, the first URL of a map could be fetched every few seconds while the second was never fetched. Received parsing ignores HELO address literals. In add_text_footer and multipattern_text_replace, lua_mime keeps the line break before MIME delimiters that follow verbatim parts. A repeated url merges its flags into the earlier url object, and urls repeated by an extracted part are kept. In HTML_TINY_PIXEL_TRACKER, an image source that also appears in the text no longer counts as image-only, and a zero in any unit counts as zero

  • Statistics, symcache and tools: bayes honours the check_balance and min_balance autolearn options. symcache reads the slow flag from the internal flags and decides whether to time an item once, when the item starts. Before this, callback items were timed on every task and slow-rule notices were wrong. rbl no longer scores a symbol twice when a final resolve_ip query merges into a query that already has an answer. rspamc labels profile times as milliseconds

Full changelog: 4.3.0...4.3.1

Release 4.3.0

Choose a tag to compare

@vstakhov vstakhov released this 13 Nov 13:34
25c9ecc

Incompatible changes

  • Phishing: URL mismatches are now scored separately from phishing. Rewrite permissions come from dynamic maps, and selected security URL wrapper hosts are trusted. The mismatch rollout is kept conservative
  • Symbol options: options are stored verbatim. []{};, and % are percent-encoded only when options are joined (X-Spamd-Result, X-Virus, metadata_exporter, ClickHouse, the symbols log line). asn, reputation, rbl, dmarc, content rules and MULTIPLE_UNIQUE_HEADERS now insert multi-value results as separate options
  • SPF: a record is evaluated in the order of its terms, and the qualifier of an include or redirect is applied after the mechanisms. Before this, -ip4:1.2.3.4 +ip4:1.2.3.0/24 -all let 1.2.3.4 pass
  • DKIM: signatures with duplicated tags or l=0 over a body are rejected. So are RSA keys under 1024 bits and keys that are not of the type k= declares. The d= domain is lowercased in results, symbol options and glob maps
  • SMTPUTF8 addresses: ASCII syntax violations now score as INVALID_FROM_ASCII_ADDR and INVALID_RCPT_ASCII_ADDR (1.0). INVALID_FROM_8BIT and INVALID_RCPT_8BIT fire only for 8-bit addresses
  • MIME and archives: a multipart child without Content-Type is read as text unless its data is binary, so short-text fuzzy hashes of such children change. get_files(n) and get_files_full(n) count files rather than names, and other names of an entry are flagged as aliases. With no limit given, archive.unpack is capped at 1 GiB of output and a million headers, and it uses only the filters libarchive implements itself
  • Lua API: lua_util inflate returns errors as a second value. lua_url get_redirected is no longer an alias of get_phished. The image flag is set only on urls seen solely as image sources, so get_urls returns a link that is also an image source. A get_date result of 0 means no date in the time('message') selector and the spamassassin plugin, so DATE_IN_PAST rules no longer match mail without a Date header
  • PDF: content streams are read as operands and operators, pages follow the page tree in document order, and words are spaced by text position moves. Extracted text changes as a result

Features

  • SMTPUTF8: address checks per draft-ietf-mailmaint-smtputf8-syntax

  • Phishing: explicit rewrite trust maps

  • New rules: BAD_DKIM_SIGNER (multimap) matches every checked DKIM d= against the bad_dkim_signers glob map. HTML_TINY_PIXEL_TRACKER and the HTML_TINY_PIXEL_PROBE composite catch contentless messages with tiny external tracking pixels. DATE_FAR_FUTURE_NO_TZ flags far-future Date headers without a timezone

  • Truncated and unreadable content: new symbols report content that was cut short or could not be read:

    • MIME_UNREADABLE_ARCHIVE, MIME_TRUNCATED_ARCHIVE and TEXT_WORDS_TRUNCATED
    • OOXML_INCOMPLETE and SVG_INCOMPLETE
    • PDF_NO_OBJECTS, PDF_DECODE_LIMIT, PDF_UNDECODED_STREAMS, PDF_PARSE_ERRORS and PDF_TEXT_TRUNCATED

    Text part get_stats gains words_sampled and words_truncated

  • Deeper inspection: EXE_IN_ARCHIVE checks names in archives named as documents, in OOXML/ODF packages and in the first 1000 names. The HTML tags limit is harder to reach, and hidden elements are tracked past it

  • Tools and API: archive.unpack gains the ignore_case and filters = false options. statistics_dump gains dump --user to dump the statistics of selected users

  • WebUI: D3 7.9.2, CodeJar 5.0.0 and Tabulator 6.7.1

Bug fixes

  • Critical: a header line without a colon in one unauthenticated HTTP request aborted the worker, and so did an empty Deliver-To header. An empty MIME part stopped parsing, so no part after it was scanned

  • Milter and proxy: fixed session use-after-frees on upstream failure and on a second end of body. Also fixed:

    • reads past CONNECT and MACRO commands
    • transaction handling on MAIL and on a repeated CONNECT
    • QUIT handling behind queued output, and writes after a partial write
    • references to ESMTP arguments
    • sockets of keepalive backends that were never closed
  • HTTP and protocol: the lua_http error handler no longer runs on freed data after a reply. Idle connections are pooled by TLS verification and peer address and checked for pending data. A plaintext reply to an encrypted request is refused. forbid_local also blocks unspecified, shared, reserved, multicast, unique local, link-local and IPv4-in-IPv6 addresses. X-Rspamd-Rcpt-Esmtp-Args keeps keywords without a value and bounds recipient indexes, and repeated From, IP and Settings-ID headers no longer leak

  • Redis: RESP3 maps, sets and doubles no longer crash the worker. The pool no longer frees a held connection that was closed, hashes key fields with their lengths, fails on AUTH/SELECT errors and caps connections per server. TLS options now reach script uploads, statistics_dump and fuzzy storage. Sentinel supports TLS and credentials and keeps the last valid upstreams after discovery errors. fuzzy_storage keeps the order of updates to a repeated digest

  • DNS and maps: librdns takes only the records that answer the question and now retries truncated replies over TCP. IDN names are converted without the transitional rules, and lua_dns PTR requests are fixed. Maps back off retries by failure class: a map whose first fetch failed used to stay empty for 100 minutes. Maps also honour Retry-After: 0 and keep polling after connect or DNS failures

  • SPF and DMARC: SPF fixes:

    • macro and prefix-length parsing, dual prefixes (a/24//64) and ip6=
    • macros and ptr now use the checked address
    • flattened records are bounded, and rspamadm dnstool spf-flatten follows the record order

    DMARC reads a record to its end; before this, an unknown tag or spaces around = dropped the policy. It also validates pct and rua, checks alignment correctly for IDN From domains and applies the organisational policy again. dmarc_report claims keys with RENAMENX and honours keys_expire

  • DKIM and ARC: DKIM signs headers added by lua_mime.modify_headers and hashes the signature header per RFC 6376. It skips empty tag-specs (;;d=trusted named another sealer). ARC trusts a forwarder only for what it vouched for and parses ARC-Authentication-Results from the raw header value. It selects headers by their parsed i= tag and fails chains over 50 sets. Sender text is escaped in Authentication-Results, so MAIL FROM or HELO can no longer add a result of its own

  • MIME and dates: the boundary search is no longer quadratic, and content after 64 sibling containers is no longer dropped. Fixes cover:

    • MIME structure: embedded messages are parsed and decoded once, and transport padding, multiparts inside opaque S/MIME, binary text/html and UTF-16 without a BOM are handled
    • header parameters: RFC 2231 values, quoted pairs and nested comments are decoded as mail readers do
    • charsets: converters are cached, and ISO-8859-16 aliases are converted
    • dates: smtp_date validation, dateless Received hops in nreceived_bad_time, and rspamd_gmtime before 2000-03-01

    Several leaks are also fixed

  • HTML and CSS: tree building, entity decoding, unquoted attributes and base resolution follow browsers. Links are taken from href, action, src, formaction and xlink:href, including past the tags limit. Hiding is tracked more accurately: author CSS overrides color, bgcolor and hidden, !important and specificity are applied correctly, and hiding by opacity, offset or clip is tracked. CSS syntax, tokens and colours are read as browsers read them. HIDDEN_TEXT ignores LRM/RLM preheader padding, and external images with zero or CSS-set sizes count as tiny

  • URLs: the reported host is the one a browser goes to (last @, backslashes, encoded separators, IDN mapping). Numeric hosts are read by the URL standard and marked as obscured. Urls that mail clients make clickable are now found, and a 200 KB line no longer takes seconds to scan. urls_limit_reached is set when max_urls is reached. url_redirector caches failures only for error_expire, waits for a concurrent resolution of the same chain and adds URL_REDIRECTOR_LIMIT

  • Archives and documents: zip names are read as unrar, 7-Zip and bsdtar read them, covering zip64, concatenated zips and Unicode Path names. The same applies to rar 4/5 and 7z names. Gzip header fields are read in RFC 1952 order; evil.exe was listed as il.exe. lua_magic detects file types by where signatures appear and follows the PE header. It requires [Content_Types].xml for OOXML and validates standalone SVG. PDF, OOXML, SVG and calendar parsing follow what readers accept and is bounded. Scanners use both the name and the detected content of an attachment

  • Text and Lua: language detection no longer depends on a few characters, a short stop words list or the worker history. A max_html_len setting was written over max_word_len and set words_decay to zero. lua_util.idna_convert_utf8 caused heap corruption with 8-bit domains. Also fixed:

    • set_recipients, set_from and filter_words
    • the re_cache leak past 8192 regexps
    • a mime_expressions double free at config load
    • multipattern, lru, zstd, controller and logger
  • Rules and build: iPhone Mail X-Mailer with five-digit iOS build numbers no longer triggers FORGED_X_MAILER. SMTPUTF8 checks accept Catalan L·L and give the same verdict on older ICU. libucl is synced with upstream, including CBOR support. The build works with older ICU and binutils 2.39+ libbfd, and RPM packaging works on Fedora 44

Full changelog: 4.2.3...4.3.0

Release 4.2.3

Choose a tag to compare

@vstakhov vstakhov released this 21 Oct 10:54
50bde75

Incompatible changes

  • Phishing: phishtank.rspamd.com is now disabled by default because the zone no longer carries data
  • RBL: Duplicate DNS queries from several checks are merged into one request and one symbol insertion, so a rule now scores once per matched value. Set merge_checks = false to keep one insertion per check
  • RBL: Fixed the inverted dkim_domainonly test under dkim_match_from. eSLDs used to be compared when dkim_domainonly was off

Features

  • force_actions: Rules that depend on composites are promoted to postfilters. A new priority setting decides between matching rules and shows up as a priority:N symbol option
  • Lua API: task:has_pre_result() now returns the action name instead of its type, plus its flags
  • metadata_exporter: Added unix_time to general metadata

Bug fixes

  • ARC/DKIM: ARC forwarders whose seal fails verification are no longer trusted. Before this fix, a whitelisted d= with a broken seal produced ARC_ALLOW_TRUSTED, and its AAR could lower DMARC. Each instance must now have exactly one ARC-Authentication-Results header, and results are published only after all seal checks finish. A DKIM key request that cannot be scheduled now counts as a failure, so ARC chains with such a seal get a result again
  • HTML and URL parsing: Declarations, comments, raw text, CDATA sections, SVG/MathML elements and /> self-closing are handled the way browsers handle them, so content after them is no longer hidden from the scan. Character references stay undecoded in CDATA and raw text elements. Text URLs end at quotes, and schemeless URLs after a double quote are found
  • Statistics: Plain and HTML alternatives are deduplicated by parts_distance, including HTML inside multipart/related, so the body is no longer counted twice. Fixed inverted substitution costs in parts distance. Statistical words are now finalized in late-injected parts
  • RBL: RSPAMD_URIBL queries eSLDs and skips IP literal hosts. Fixed require_symbols, which stopped rules using it from ever running, and luapattern matching for return_codes. From and DKIM domains are normalised the same way
  • Networking: HTTPS reads no longer stall on TLS records over 8 KiB. librdns reconnects the UDP channel after the kernel drops it. HTTP upstreams resolve for hosts without a public suffix, which fixes gpt failing on every message after a reload. monitored loads every element of an ipnet array
  • Lua API: store_in_file and save_in_file retry short writes, keep the default 0600 mode and leave a caller-supplied descriptor open. Table set_pre_result uses normal priority by default and accepts several flags. get_symbol_flags reports the composite flag
  • Crashes and leaks: Fixed a milter session use-after-free on connection close, a crash on a regexp map that repeats an invalid regexp, and a crash in get_stat_tokens without a classifier. Fixed DNS resolver leaks on worker shutdown and ESMTP argument container leaks
  • Core: Hyperscan recompiles cached map and multipattern databases that fail to deserialize, so stale blobs no longer leave maps on the PCRE fallback. Fixed symcache persistence and file descriptor ownership. MIME parsing accepts obsolete whitespace before header colons

Full changelog: 4.2.2...4.2.3

Release 4.2.2

Choose a tag to compare

@vstakhov vstakhov released this 10 Oct 21:43
a5bf035

Incompatible changes

  • MIME parts: the CRLF before a boundary delimiter no longer counts as part of the preceding part. Message digests and non-base64 part digests change for multipart messages, so anything keyed on them will not match values computed by earlier versions.

Features

  • Crypto wallet detection: Rspamd now detects wallet addresses for Bitcoin and its forks, Litecoin, Dogecoin, Tron, XRP, Zcash, Cardano, Cosmos, Stellar, TON, Ethereum and Monero, with one independent symbol per currency. This replaces bitcoin.lua. The bounded scanner in lua_crypto_addresses also catches addresses split across text, add_from_string feeds it text recovered from attachments, and the new crypto_addresses() selector extractor exposes the results.
  • metadata_exporter: mail_from, mail_to, helo, channel, stream_key and the email template support custom variables and selector expansion. Email alerts can be built as multipart messages from email_parts, with plain and HTML parts grouped into multipart/alternative, and non-ASCII headers are encoded automatically. Rules are validated against a schema, so configtest fails on an invalid rule.
  • lua_smtp: EHLO and 8BITMIME are negotiated with a HELO fallback. 8-bit messages are downgraded to 7-bit when the server does not advertise 8BITMIME.
  • Lua API: util.fold_header_unstructured folds unstructured headers per RFC 5322, and rspamd_text gains an smtp newline normalization mode.

Bug fixes

  • Memory safety: fixed a heap overflow in util.lower_utf8 (U+023A and U+023E grow when lowercased). Also fixed a crash during HTTP keepalive reset, when a late error handler ran after the peer had closed the connection.
  • HTML and URLs: table elements no longer inherit box sizes, which triggered HIDDEN_TEXT and MANY_INVISIBLE_PARTS on tables pasted from Google Sheets. Visible link text is terminated after normalisation, because stale trailing bytes broke phishing checks. Invisible characters in hostnames are now flagged instead of truncating the URL, and U+FEFF is stripped during unicode normalisation. url_suspect anchors obfuscated URL extraction to the matched URL and makes URL_OBFUSCATED_TEXT one-shot, so domains written in plain sight are no longer reported as obfuscated.
  • Message composition: mime_headers emits valid RFC 2047 encoded-words and keeps addresses intact in structured mode. lua_smtp dot-stuffs DATA (a line with a single . truncated messages), turns bare CR into CRLF, accepts a bare reply code and reads multi-line greetings.
  • Lua library: deferred DNS for HTTP upstreams is retried, so gpt, aws_s3, HTTP maps and dkim vault no longer stay stuck after a failed lookup at startup. callback_from_string compiles whole-chunk callbacks, task:get_symbol() works with a table of names when the symbols are present, and parse_content_type keeps boundary and charset as strings.
  • Modules: LEAKED_PASSWORD_SCAM fires only on checksum-verified addresses, and the word "wallet" no longer counts as a scam signal. known_senders expires senders after max_ttl in zset mode, and both known_senders and replies honour reply_sender_privacy. milter_headers applies header skipping to x-spamd-bar and fixes the x-virus fail branch. fuzzy_check parses top-level html_ignore_domains, and metadata_exporter always emits an integer redis_stream MAXLEN. cfg_transform no longer warns about scored custom actions, and rspamadm control fuzzystat labels epochs correctly.

Full changelog: 4.2.1...4.2.2

Release 4.2.1

Choose a tag to compare

@vstakhov vstakhov released this 01 Oct 10:09
b7a16ae

Bug fixes

  • Security: fixed several critical memory-safety bugs; upgrading is strongly recommended. A huge chunk size or Content-Length from a peer could cause an HTTP heap overflow, because the body was sized from that value. Zero-copy HTTP reads could hit a use-after-free when a finish handler replaced the body. An fstring length that cannot be allocated used to wrap and lead to out-of-bounds writes; it is now refused. Cryptobox now fails closed on low-order public keys; before, an uninitialised shared secret was cached and used to decrypt fuzzy requests.
  • HTTP: the parser now refuses messages framed by both Content-Length and Transfer-Encoding. It also checks Content-Length and chunk sizes before they overflow. The last trailer of a chunked message is now finished, chunk framing stays out of encrypted inner bodies, and timeouts apply at the correct I/O stage. lua_http fixes request tuning after DNS and coroutine cleanup on cancellation. lua_tcp stops after a fatal TLS read and limits how much data it buffers for a stop pattern.
  • Redis: hiredis no longer aborts on an assertion when Redis is down. Lua no longer reads freed Redis replies. Fuzzy Redis count scans keep the address userdata.
  • Maps: maps now use the HTTP body length instead of the shared memory size, which fixes garbage in large chunked maps and their cache. A failed reload keeps the previous map. Truncated zstd frames are rejected, and /savemap writes the whole map. Reading cdb maps skips the HTTP cache header, and the shared memory mapping no longer leaks on errors.
  • Fuzzy storage: the TCP backlog is bounded, unauthenticated error replies are rate-metered, and key expiry is enforced for writes and deletes. The backend saturates deduplicated weights instead of overflowing and rejects short Redis shingle digests.
  • DNS: fixed rdns TCP queue accounting, a dropped last byte in TCP packets, malformed reply handling and the retransmit channel lifetime.
  • Regexps: hyperscan prefiltered regexps are verified per input, and hit counts saturate instead of wrapping. UTF-8 is validated once per search, not on every remaining suffix.
  • SPF and DKIM: SPF a and mx without a prefix length now match per address family, and the macro digit transformer is applied. Fixed a DKIM header table leak and the l= body check with relaxed canonicalisation.
  • URLs and IPv6: the URL parser no longer reads past an IPv6 host at the end of the input, and it treats mapped loopback addresses as local. The URL redirector keys by the raw URL, caps the whole redirect chain and resolves relative Location headers. RBL whitelists now work for IPv6 addresses, and multimap supports IPv6 ULA prefixes in Redis maps.
  • Archives: hardened rar, 7z and libarchive parsing. 7z reads substream sizes and digests per stream, so archives with an unpacked header now list their files. Avast keeps the cached virus verdict for archives.
  • HTML, CSS and MIME: the HTML parser limits the text it inspects per link and no longer treats JSON attachments as HTML. Nested HTML processing and structure exports are bounded without losing phishing checks. The parser no longer rescans quoted attributes for >, and entity replacements stay within the consumed input. The CSS parser limits the token count while building the block tree and no longer swallows the byte after a hex escape. Adjacent MIME encoded words are decoded with their own charsets.
  • UCL: binary msgpack strings now own their value, which fixes a use-after-free once the input buffer is released. A msgpack map that ends in an empty value now keeps its key.
  • Rules: Mailchimp is exempt from SUBJ_EXCESS_QP and REPLYTO_EXCESS_QP.

Full changelog: 4.2.0...4.2.1

Release 4.2.0

Choose a tag to compare

@vstakhov vstakhov released this 18 Sep 11:50
6268f47

Incompatible changes

  • Public suffix list: host TLDs, free-text URL discovery, multimap's top filter and RBL URL composition maps now all resolve through the new public suffix lookup instead of the old TLD tables. ! exception rules are honoured, a host that is itself a public suffix resolves to the whole host, and maps used with top must list full suffixes (com.au instead of au). Free-text URL discovery runs in two passes (static matcher plus dot-anchored suffix labels), and the 10.5k-pattern TLD hyperscan database is gone from the scanner.
  • symcache: one scheduler now runs over the dependency graph — every item gets a stage and a level at init, and a dependency edge moves its target instead of being executed from the wrong stage.
  • fuzzy: redis hashes are counted with a periodic SCAN instead of a counter maintained by the update script; negative counters left by older versions are reported as 0.

Features

  • Attachment content extraction: SVG attachments yield content and smuggling indicators (SVG_CONTENT, SVG_SCRIPT, SVG_FOREIGN_OBJECT, SVG_DATA_URI, SVG_FORM and friends), XLSX and PPTX yield relationship-level facts (OOXML_MACROS, OOXML_OLE_OBJECT, OOXML_REMOTE_TEMPLATE, OOXML_EXTERNAL_DATA), and DOCX gets bounded content extraction plus a flag for unprocessable attachments. HTML parts can also be injected from Lua, so decoded payloads go through the regular HTML parser.
  • Public suffix lookup: a new component with full public suffix list semantics (wildcards, exceptions, ICANN/private split), exposed to Lua as rspamd_tld_lookup (including custom suffix-like rule sets), url:get_public_suffix() with match flags, and the get_public_suffix selector transform.
  • Symbol dependencies: selector extractors declare the symbols they need, and ratelimit, multimap, rbl and reputation register them as dependencies. Prefilters may now depend on filters, hoisting the filter and its own dependencies to the prefilter stage.
  • dkim: From alignment is decided in the module that actually knows about it and reported as R_DKIM_ALIGNED (R_DKIM_ALLOW goes from -0.2 to -0.1, the rest moves to R_DKIM_ALIGNED).
  • css: compound selectors and combinators are evaluated (div.mainbox, div p, div > p, h1 + p, h1 ~ p).
  • fuzzy: sampled storage statistics from the count scan (count_scan.stats_sample), published in /fuzzystat and printed by rspamadm fuzzystat, plus lazy per-source stats for keys with a configurable cap (max_ips_per_key, per-key max_ips) and an overflow guard.
  • Untrusted UCL input: ucl.untrusted_parser(), parser:set_limits() and parser:get_limits() in the Lua API, and bounded UCL parsing of untrusted network input (controller and proxy bodies, checkv3 metadata in JSON and msgpack).
  • lua_aliases: mailbox identity and equivalent domain classes for comparing addresses.
  • WebUI: fuzzy storages can be pinged (fuzzy_check.ping_storage_all, /plugins/fuzzy/status) with per-server liveness marks, down badges and an on-demand Check button, and the storage table shows unavailable storages. Bayes gets a learns balance bar and a min_learns status badge. The Status servers table gains three-state health, a per-server details row, load and latency, version and config drift, a Writable badge, an informative All SERVERS cluster row derived from cluster data, and the git build id.
  • Misc: ClickHouse data-skipping indexes for point lookups (schema 12), a redis_list pusher in metadata_exporter, and upstream pinning for lua_redis requests.

Bug fixes

  • Hardening against hostile input: libucl bounds container nesting for every parse type and frees trees iteratively (a deeply nested document crashed while being freed); the rdns reply parser is hardened against malformed packets (out of bounds name and RDATA reads, a wrapping TXT counter, recursion on TCP reads); PDF parsing and text extraction bound resource amplification (CMap bytes, object totals, deadlines, memoised streams); and lua_compress bounds decompression output and memory (zstd passed the attacker-controlled frame size straight to g_malloc).
  • symcache: dependency cycles are broken at init (stack overflow in rspamd_symcache_get_max_timeout), connfilter and prefilter dependencies on filter symbols are forbidden with every rejected edge actually dropped, symbols registered after cache init are planned, leaked async counters no longer spin, and ignore_passthrough symbols run after a pre-result from a prefilter.
  • maps: destroyed regexp helpers are dropped from the hyperscan compilation queue (worker crash on a freed helper), the reread of a just-truncated map file is deferred, and cold passive workers converge on HTTP maps quickly instead of sleeping a full poll interval with no data. lua_maps keys url-list maps by their effective type, so a glob map is no longer served as a hash map.
  • css/html: selector matching is bounded with a document-wide budget, ending the combinatorial backtracking on deep nesting; a repeated selector keeps its own cascade entry and only the winning rule is allocated; a grouped selector that cannot be evaluated is dropped instead of registering its first part; relative and shorthand font sizes no longer hide visible text (line-height taken as the size, misspelled vw/vh units, unresolved percent sizes) and a unitless zero is accepted as the font shorthand size; a transparent tag's content is read from the buffer it was written to (R_WHITE_ON_WHITE on messages that also carry hidden text); and layout padding is ignored in hidden text checks, with substantial hidden content penalised.
  • settings: custom apply keys survive layer merges, actions are applied the same way as on the single-layer path, actions from higher layers are re-enabled, and ip_map/client_ip_map actually match.
  • mime: nested SVG payloads are charged to the shared payload budget, injected HTML parts get the regular URL pipeline, OOXML relationship-only parts are kept ahead of story truncation with xlIntlMacrosheet parsed, OOXML processing resources are bounded, and the DOCX content symbol scores are registered.
  • fuzzy: customer keys take precedence over IP bans (the source policy is applied after decryption), key expiry time fields are initialized before mktime and failed date parses rejected, the unkeyed aggregate stats survive with per-IP tracking disabled, write servers are pinged with the write keypair (and the keypair is only overridden when the server lists are actually shared), and empty storages are reported in /stat.
  • Sender authentication: dkim requires a single author before reporting alignment, spf returns permerror when a domain publishes multiple SPF records and matches the version section as RFC 7208 4.5 defines it without reading past a short TXT string, and forged_recipients compares addresses by mailbox identity instead of as raw strings.
  • Modules: chartable handles language diacritics correctly, including non-Latin ones, with hardened Unicode spoof detection; greylist uses the lowest passthrough priority for its pre-result; milter no longer inserts a bogus space after the header colon (SMFIP_HDR_LEADSPC is negotiated); url_redirector honours redirectors_only, which previously followed every redirect target; and url_suspect restricts the html_entities obfuscation pattern to ASCII and derives the public suffix through the suffix lookup instead of stripping a label from the eSLD.
  • WebUI and tools: stat refresh cycles are ordered by start rather than completion, the stale-rate threshold is raised above the largest auto-refresh preset, and the -n description in the rspamadm fuzzy_ping help is fixed.

Full changelog: 4.1.5...4.2.0

Release 4.1.5

Choose a tag to compare

@vstakhov vstakhov released this 15 Aug 10:52
9a291a4

Incompatible changes

  • GPT: The condition callback now returns only a boolean; request content generation moved into gpt_check
  • Workers: Ship explicit allow_file_and_shm_inputs = true defaults for the normal, controller and proxy workers (the default becomes false in the next major release)

Features

  • Fuzzy: Share sender facts (SPF, DKIM, DMARC, PTR state, recipient bucket, TLS) with storages over encrypted rules
  • PDF: Font-aware text extraction — decode simple font text via the font's /Encoding (Annex D base encodings and /Differences overrides) and parse /ToUnicode CMaps to decode composite (Type0) fonts
  • Elastic: Structured fuzzy match results and message size in the schema

Bug fixes

  • Protocol: Gate File/Path/Shm message sources behind allow_file_and_shm_inputs — previously any TCP client could have arbitrary files parsed
  • Controller: Rate limit authentication failures per source (max_auth_failures)
  • Fuzzy: Per-key forbidden_ids now replaces the default set instead of adding to it; apply the per-key ACL to delayed v1 replies; skip unknown wire extension types instead of rejecting the whole command; do not share extensions for authenticated senders, own networks or plain text rules
  • Neural: Bound static_embed word extraction with max_words and drop the quadratic subject prepend; fuse over the provider slot range so one missing provider does not discard the rest
  • PDF: Keep TJ positioning gaps out of the character code stream; keep inline /Resources dictionaries so page fonts are visible; store CMap codes with their byte width to avoid collisions; refuse a CMap that inherits from another instead of returning partial text; drop the font-blind ligature substitution
  • Charsets: Keep computed text parts raw and resolve CED charset names through the alias table; restrict the EUC-TW misnomer aliases to CED output
  • Hyperscan: Make the cache usable with a Redis backend (replica reads, null replies, maps read after fork); do not fetch a database that is already installed
  • URLs: Treat a schemeless email href as mailto, not HTTP userinfo (spurious URL_USER_PASSWORD); do not drop flagless URLs when all flags are included
  • Symcache: Stamp slow-rule start under the same condition it is measured, eliminating phantom slow-rule warnings
  • Hfilter: Compare HELO addresses against the connecting IP, ignoring transient lookup failures
  • Mime: Unwind every boundary level when returning from nested parts in all lua_mime rewriters
  • ARC: Score ARC_ALLOW_TRUSTED at most once
  • History: Clear all rows on reset in both the legacy ring buffer and the Redis backend; WebUI search now covers symbol option values
  • Lua: Fix logger format string and argument mismatches

Full changelog: 4.1.4...4.1.5

Release 4.1.4

Choose a tag to compare

@vstakhov vstakhov released this 29 Jul 09:38
beb659b

Incompatible changes

  • Build: rspamd now links a single shared jemalloc instance per process and refuses a static-only jemalloc — duplicated allocators caused segfaults at startup

Features

  • WebUI: read-only users can now access the Selectors tab and the Errors history

Bug fixes

  • Controller (critical): fail closed on a malformed password hash — previously any password was accepted
  • Regexp engine: fix a PCRE2 match-data leak on invalid UTF input, bound the heap a single match can use, stop re:matchn() looping forever on empty matches, avoid reading past the end of a bounded pattern when generating ids, and propagate the regexp data limit to named scopes
  • Message processing: consult the Lua URL filter at most twice per user field instead of once per byte, and bound the words retained per message with a message-wide budget
  • CSS: skip comments iteratively in the tokeniser, avoiding a stack overflow on many sequential comments
  • Startup: release actrie GLib allocations with g_free, fixing a startup segfault with jemalloc
  • rspamadm: resolve SRV-based upstreams and wait for storages in fuzzy_ping and fuzzy_hash

Full changelog: 4.1.3...4.1.4

Release 4.1.3

Choose a tag to compare

@vstakhov vstakhov released this 25 Jul 19:27
f6297bc

Incompatible changes

  • WebUI: jQuery has been dropped entirely — all modules are migrated to native DOM and XMLHttpRequest. Font Awesome is also gone, replaced by a local subset SVG sprite.
  • DKIM: HAVE_ED25519 is now scoped to OpenSSL key parsing, so ed25519 verification works on OpenSSL builds without it.

Features

  • Fuzzy check: structured match results with a diagnostics API and task:get_fuzzy_results(), plus a probability weight curve anchored at the match threshold (prob_bias, prob_power).
  • Fuzzy storage: shingle sets are persisted with digests in Redis, fixing orphaned slots on DEL and decay on REFRESH. Unkeyed clients are now tracked in fuzzystat, and per-hash introspection is available via rspamadm control fuzzyhash.
  • rspamadm: new fuzzy_hash command.
  • Reporting: ClickHouse exports fuzzy match details (schema version 11), and milter_headers annotates the X-Rspamd-Fuzzy header with rule, flag, probability and timestamp.
  • lua_http: new forbid_local option blocks requests to local networks, enabled by default in url_redirector.
  • lua_feedback_parsers: sparse ARF reports are enriched from the original message headers.

Bug fixes

  • Critical: bound bh= length before the DKIM body hash comparison (out-of-bounds read via ed25519 signatures); release fuzzy TCP session ownership exactly once (use-after-free on aborted connections); validate shared memory segment bounds and reject non-regular segments in the protocol; fix the shared HTTP body storage lifecycle (double free, descriptor 0 leak, and closing an unrelated socket).
  • DKIM: bound public key size and modulus width from DNS, bound the number of h= header list items, apply max_sigs before any work while counting every signature header, and stop reading before the body slice when skipping empty lines.
  • SPF: return permerror when a DNS limit is hit, enforce the include/redirect nesting limit, bound address lookups spawned by mx/ptr expansion (max_dns_expansions), and use the enclosing element for exists.
  • Fuzzy: check admission before parsing UDP commands and rate limit PING and STAT, fix a stack overread in the sqlite backend id, and log the rule and the server for error replies.
  • MIME parsing: resource bounds throughout the header and body parsers — nested comment depth in ragel, mime_parser, mime_headers, parameters per header in content_type (with RFC 2231 continuation ordering fixed), and task-global per-part newline metadata.
  • HTML: DOM recursion eliminated so deeply nested messages survive, attributes bounded per tag and per task, synthetic tags capped with the balance loop fixed, and image style dimension parsing corrected.
  • Message structure: plain text parts are linked to their HTML alternative, with alt-part linking and fasttext langdet cost bounded; Content-ID image linking is no longer quadratic.
  • Archives: metadata resource usage bounded, and 7zip folder count bounded with guaranteed parser progress.
  • URLs: max_urls is enforced at the central insertion boundary; url_suspect skips mailto URLs and drops a dead branch in the user field check.
  • HTTP and maps: request bodies bounded on the controller, proxy and control sockets; the read deadline is enforced when data is pending at timer expiry; remote HTTP map sizes bounded both compressed and decompressed (max_map_size); signature files mapped as files rather than shmem; credentials redacted from map error logs; shared memory mapping helpers hardened.
  • Compression: a single bounded zstd decompression helper is shared across HTTP, proxy and maps, and task decompression is bounded by max_message with an error-path leak plugged.
  • Lua: lua_http bounds responses by default (max_lua_http_response) and delivers errors to coroutine callers, the lua_tcp connection ref release is one-shot to avoid a double free, and lua_content/pdf emits newlines for Td/TD line breaks.
  • Configuration: warn when a module section is defined multiple times.
  • WebUI: route a malformed /stat response to the login dialog, restore smooth scroll on the Scan tab, stop the refresh spinner restarting mid fan-out, and guard the optional fuzzy_hashes key along with other jQuery-removal regressions.

Full changelog: 4.1.2...4.1.3

Release 4.1.2

Choose a tag to compare

@vstakhov vstakhov released this 21 Jul 17:54
9fff684

Incompatible changes

  • lua_task: the orig address flavour now returns only the wire (transmitted) addresses when a rewrite preserved the originals
  • WebUI: all tables migrated from FooTable to Tabulator (per-column filters, global history/scan search); FooTable has been removed

Features

  • Composites: per-symbol Lua conditions and explicit dependencies
  • Neural: new static_embed provider (WordPiece subword tokenizer over a static embedding matrix, with per-token vector access); forced-learn minimal-scan fast path and train.frozen control to stop automatic training
  • Settings: new apply policy option implicit_allow with additive symbols_enabled, plus strict explicit_enable gating
  • Rspamadm: command modules can be discovered from external directories (rspamadm.d, RSPAMADM_COMMAND_PATH); the controller password can be read from the environment for automation
  • Configdump: show symcache flags in --symbol-details

Bug fixes

  • Security: bound message/rfc822 recursion depth in the MIME parser (remote DoS via deeply nested messages); pass the padded nonce to secretbox encrypt/decrypt (out-of-bounds read with short nonces)
  • Sender identity vs aliases: the aliases rule no longer rewrites From address domains (and never rewrites googlemail.com to gmail.com); DMARC, SPF and forged_recipients now evaluate addresses as seen in the message, not after alias rewriting
  • MIME: split address lists on semicolons as well as commas (Outlook-style recipient lists)
  • Fuzzy: skip injected (computed) parts on learn and check
  • Phishing: don't penalise the same label under another TLD (brand.co.uk displayed over brand.com)
  • Maps: glob map patterns are now anchored to match the whole subject; entries relying on substring matching need explicit wildcards
  • Selectors: reject selectors that parse only as a prefix instead of silently evaluating the truncated part; don't crash the scan on a method call missing on the extracted value
  • Lua: fix lua_kann load({filename}) argument index and save() return value; Lua 5.5 compatibility fix for Jinja templates (no assignment to for-loop variables)
  • Plugins: don't send a duplicate GPT request when context_augment invokes its callback synchronously; fix HTTP header insertion in ICAP get_http_headers; don't call blocking sleep from an async callback when throttling DMARC report batches

Full changelog: 4.1.1...4.1.2