]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Aliases: refuse to rewrite From domains
authorVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 16 Jul 2026 09:01:55 +0000 (10:01 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 16 Jul 2026 09:01:55 +0000 (10:01 +0100)
commit9fe6cb2aa05043890aea8f60eb18e28fce5ae622
tree8d6ac723c2fad46b107c560f9221e4e388bbd45d
parent1b0cdd77992402427b1727f4c8c14bde56c08b2a
[Fix] Aliases: refuse to rewrite From domains

The From address is the sender's identity: SPF, DKIM and DMARC all key
on its domain. Service rules and alias resolution (e.g. a virtual alias
mapping to another domain) may only touch the local part of the From
address; any rewrite that would change the domain is now discarded.
Recipient rewriting is unaffected: recipients are interpreted by the
receiving host, and no authentication protocol keys on them.

Also fix a spurious task:set_from call: the set_from decision used the
callback-wide alias_resolved flag, so a rewrite of any earlier address
(e.g. an envelope recipient) caused the unmodified MIME From to be
marked as aliased and duplicated.

Issue: #6137
src/plugins/lua/aliases.lua