store rejects for 14 days, and don't keep them as neutral by default so they won't cause outright rejects for repeated delivery attempts of spam messages

the previous default, marking the messages as junk had the interesting effect
of training the junk filter. rejecting could have been the result of the
sending IP being in the DNSBL. so the DNSBL helped to automatically train the
junk filter. perhaps we can keep that in the future and just not take messages
from the rejects mailbox into account when evaluating the reputation for
incoming deliveries.
This commit is contained in:
Mechiel Lukkien
2023-02-13 10:47:20 +01:00
parent 87854cfde3
commit 707d3a3fa0
5 changed files with 16 additions and 13 deletions

View File

@ -2151,7 +2151,9 @@ func (c *conn) deliver(ctx context.Context, recvHdrFor func(string) string, msgW
log.Errorx("checking whether reject is already present", err)
} else if !present {
m.Seen = true // We don't want to draw attention.
m.Junk = true // This is junk, also train as such.
// Regular automatic junk flags configuration applies to these messages. The
// default is to treat these are neutral, so they won't cause outright rejections
// due to reputation for later delivery attempts.
m.MessageID = messageid
m.MessageHash = messagehash
acc.WithWLock(func() {