Commit https://github.com/InterLinked1/lbbs/commit/121037bc100176428db8a7b551e757b431a00ca5 introduced a regression by breaking the ability for the Received header to include the envelope recipient in the header, since with SMTP_SCOPE_COMBINED
, there isn't a specific recipient available for processing, just the list of all recipients (so if multiple recipients are being processed, we wouldn't know yet which one this is).
e.g.
Received: from localhost (localhost [127.0.0.1])
by HOSTNAME with SMTP
for (null); Mon, May 26 2025 17:37:25 +0000
This will be a bit tricky to resolve, as the Received header needs to be added before other COMBINED
filters, like SpamAssassin (which, for efficiency, really only should be run once per delivery). However, the Received
header was added per-recipient previously so that this could be done.
A hacky kludge workaround could be to, once we start doing individual processing, find the topmost Received header (which would have been added earlier, but incompletely) and then stuff in the actual envelope recipient at that point. However, that would require keeping prepended headers in memory from the combined phase into the individual phase without prepending/flushing them inbetween, and it would be far from elegant. This needs some thought as to the best solution.
You must be