Spam filter strength as a level: Relaxed, Balanced or Strict #50

Merged
jcoffey-dev merged 2 commits from feature/spam-level into main 2026-09-28 23:03:09 +00:00
Owner

First-wave item 4 from the settings-reorg spec, which was missed earlier.

Spam filter › General opens with How hard the spam filter is, instead of three bare score thresholds. What they do (spam-filter/src/analysis/score.rs): a score at or above scoreSpam goes to Junk, at or above scoreReject is refused at SMTP (the sender gets a bounce), at or above scoreDiscard is accepted and silently deleted. A reject or discard threshold of 0 is off.

Level Junk from Refused from Discard
Relaxed 8 never off
Balanced (stock) 5 never off
Strict 4 12 off
  • Outcomes in words. Under the levels, what happens by score ("12 or more: refused, and the sender gets a bounce"; "Nothing is refused or deleted: people can always look in Junk").
  • No level discards. A hand-set discard threshold is flagged, and picking a level turns it off.
  • Switches beside the levels:
    • the filter on or off;
    • never treat replies to people's own messages as spam;
    • never treat address-book senders as spam;
    • Pyzor (x:SpamPyzor), noting that a fingerprint of each message goes to public.pyzor.org.
  • Links to Local AI, Blocklists, Scores and Trusted domains.
  • Hand-set thresholds show as set by hand. The form below reloads after a save.

The numbers 8, 4 and 12 are starting points I chose. Balanced is the stock 5/0/0.

Checked: unit tests for recognising levels (stock = Balanced), no discarding, and the outcome sentences (496 total), plus typecheck, lint and build. In Chrome against a local server, stock showed as Balanced; picking Strict with Pyzor off and saving showed Current and reloaded the form. Read back over JMAP: scoreSpam 4, scoreReject 12, scoreDiscard 0, Pyzor disabled, no config warnings.

English only: about 20 new strings.

Also in this PR (second commit): the page heading now comes first. The cards on Spam filter, Sender checks, Retention, Reports and Metrics sat above the page heading, and on the last three the heading was inside the fold. DynamicForm takes an intro (drawn right under its heading) and foldSections (folds the fields and Save under a label). All five pages now read heading → card → settings. Checked in Chrome on Spam filter and Auto-expunge; the fold still opens with the fields and Save.

First-wave item 4 from the settings-reorg spec, which was missed earlier. Spam filter › General opens with *How hard the spam filter is*, instead of three bare score thresholds. What they do (`spam-filter/src/analysis/score.rs`): a score at or above `scoreSpam` goes to Junk, at or above `scoreReject` is refused at SMTP (the sender gets a bounce), at or above `scoreDiscard` is accepted and silently deleted. A reject or discard threshold of 0 is off. | Level | Junk from | Refused from | Discard | |---|---|---|---| | Relaxed | 8 | never | off | | Balanced (stock) | 5 | never | off | | Strict | 4 | 12 | off | - **Outcomes in words.** Under the levels, what happens by score ("12 or more: refused, and the sender gets a bounce"; "Nothing is refused or deleted: people can always look in Junk"). - **No level discards.** A hand-set discard threshold is flagged, and picking a level turns it off. - **Switches beside the levels:** - the filter on or off; - never treat replies to people's own messages as spam; - never treat address-book senders as spam; - Pyzor (x:SpamPyzor), noting that a fingerprint of each message goes to public.pyzor.org. - **Links** to Local AI, Blocklists, Scores and Trusted domains. - **Hand-set thresholds** show as *set by hand*. The form below reloads after a save. The numbers 8, 4 and 12 are starting points I chose. Balanced is the stock 5/0/0. **Checked:** unit tests for recognising levels (stock = Balanced), no discarding, and the outcome sentences (496 total), plus typecheck, lint and build. In Chrome against a local server, stock showed as Balanced; picking Strict with Pyzor off and saving showed *Current* and reloaded the form. Read back over JMAP: scoreSpam 4, scoreReject 12, scoreDiscard 0, Pyzor disabled, no config warnings. English only: about 20 new strings. **Also in this PR (second commit):** the page heading now comes first. The cards on Spam filter, Sender checks, Retention, Reports and Metrics sat above the page heading, and on the last three the heading was inside the fold. `DynamicForm` takes an `intro` (drawn right under its heading) and `foldSections` (folds the fields and Save under a label). All five pages now read heading → card → settings. Checked in Chrome on Spam filter and Auto-expunge; the fold still opens with the fields and Save.
jcoffey-dev added 1 commit 2026-09-28 22:59:05 +00:00
Spam filter strength as a level: Relaxed, Balanced or Strict
ci / build (pull_request) Canceled after 2m6s
ci / publish (pull_request) Canceled after 0s
9d63a66d2a
Spam filter › General opens with how hard the filter is, instead of
three score thresholds whose meaning isn't on the page:

- Relaxed: Junk from a score of 8; nothing refused.
- Balanced (the server's stock setting): Junk from 5; nothing refused.
- Strict: Junk from 4, and refused at delivery from 12, so the sender
  of a misjudged message gets a bounce.

Under the levels, what happens by score in words. No level discards:
discarded mail is deleted and nobody is told. A discard threshold set
by hand is flagged, and picking a level turns it off.

Beside it: the filter's on/off, trusting replies and address-book
senders, and Pyzor (noting that a fingerprint of each message goes to
public.pyzor.org), with links to Local AI, blocklists, scores and
trusted domains. Thresholds set by hand show as such. The form below
reloads after a save.
jcoffey-dev added 1 commit 2026-09-28 23:01:12 +00:00
Page heading first, then the summary card, on every page that has one
ci / build (pull_request) Successful in 1m30s
ci / publish (pull_request) Skipped
df2d8209e1
The level and sentence cards on Spam filter, Sender checks, Retention,
Reports and Metrics sat above the page's own heading, and on the last
three the heading was inside the fold, so those pages had no title at
the top. The form now takes an intro, drawn right under its heading,
and can fold its fields and Save under a label. All five pages use it:
heading, card, then the settings (folded where the card does the
everyday work).
jcoffey-dev merged commit 879a207d03 into main 2026-09-28 23:03:09 +00:00
jcoffey-dev deleted branch feature/spam-level 2026-09-28 23:03:09 +00:00
Sign in to join this conversation.