mox/testdata/smtp/junk/domains.conf
Mechiel Lukkien 9c31789c56
add option to ruleset to accept incoming spammy messages to a configured mailbox
this is based on @bobobo1618's PR #50. bobobo1618 had the right idea, i tried
including an "is forwarded email" configuration option but that indeed became
too tightly coupled. the "is forwarded" option is still planned, but it is
separate from the "accept rejects to mailbox" config option, because one could
still want to push back on forwarded spam messages.

we do an actual accept, delivering to a configured mailbox, instead of storing
to the rejects mailbox where messages can automatically be removed from.  one
of the goals of mox is not pretend to accept email while actually junking it.
users can still configure delivery to a junk folder (as was already possible),
but aren't deleted automatically. there is still an X-Mox-Reason header in the
message, and a log line about accepting the reject, but otherwise it is
registered and treated as an (smtp) accept.

the ruleset mailbox is still required to keep that explicit. users can specify
Inbox again.

hope this is good enough for PR #50, otherwise we'll change it.
2023-08-09 22:25:10 +02:00

42 lines
1.3 KiB
Text

Domains:
mox.example: nil
Accounts:
mjl:
Domain: mox.example
Destinations:
mjl@mox.example: nil
mjl2@mox.example:
Rulesets:
-
SMTPMailFromRegexp: remote@example\.org
AcceptRejectsToMailbox: mjl2junk
Mailbox: mjl2
RejectsMailbox: Rejects
JunkFilter:
# Spamminess score between 0 and 1 above which emails are rejected as spam. E.g.
# 0.95.
Threshold: 0.95
Params:
# Track ham/spam ranking for single words. (optional)
Onegrams: false
# Track ham/spam ranking for each two consecutive words. (optional)
Twograms: true
# Track ham/spam ranking for each three consecutive words. (optional)
Threegrams: false
# Maximum power a word (combination) can have. If spaminess is 0.99, and max power
# is 0.1, spaminess of the word will be set to 0.9. Similar for ham words.
MaxPower: 0.1
# Number of most spammy/hammy to use for calculating probability. E.g. 10.
TopWords: 10
# Ignore words that are this much away from 0.5 haminess/spaminess. E.g. 0.1,
# causing word (combinations) of 0.4 to 0.6 to be ignored. (optional)
IgnoreWords: 0.1
# Occurrences in word database until a word is considered rare and its influence
# in calculating probability reduced. E.g. 1 or 2. (optional)
RareWords: 0