Skip to content

Reject spam to forwarded addresses instead of passing it on - #34

Merged
byjpr merged 1 commit into
claude/admiring-planck-25cvzffrom
claude/fix-10-forward-spam
Oct 9, 2026
Merged

byjpr merged 1 commit into
claude/admiring-planck-25cvzffrom
claude/fix-10-forward-spam

Conversation

@byjpr

@byjpr byjpr commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Closes #10

Changes

  • Rspamd settings.conf rule forwarded_recipients, generated only when settings.forwards is non-empty. For mail to forwarded addresses:

    • the reject threshold drops to settings.forwardRejectScore (default 6, Rspamd's normal "add header" threshold);
    • "add header" and "rewrite subject" are disabled.

    Spam that would only be marked for a local mailbox is therefore refused during SMTP rather than forwarded from our IP. The sending server handles the bounce, so we create no backscatter.

  • Mail to local mailboxes keeps the normal thresholds.

Testing

I ran Rspamd 4.0.1 locally with the generated config, plus a test-only symbol with an adjustable score so the total landed at 9:

Recipient Score Action
[email protected] (forwarded) 9.00 / 6.00 reject
[email protected] (local mailbox) 9.00 / 15.00 add header

All 5 provider example systems build. nixfmt, shellcheck and tofu validate pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G22o7QQ17GRtkCqpJNFr9B


Generated by Claude Code

Mail to an address in settings.forwards is sent on from our IP, so spam
that would only be marked for a local mailbox was forwarded to Gmail &
co. under our reputation. An Rspamd settings rule for the forwarded
recipients rejects at settings.forwardRejectScore (6, Rspamd's add-header
threshold) during SMTP, leaving the bounce to the sending server.

Closes #10

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01G22o7QQ17GRtkCqpJNFr9B
@byjpr
byjpr merged commit bf96e04 into claude/admiring-planck-25cvzf Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Medium] Forwarding relays spam under our IP's reputation

2 participants