Commit Graph

17 Commits (d4254bfd1f1b0e87c2d2d32ddb1b4985853f4ebc)

Author SHA1 Message Date
Pierre Jaury b46433cabe Fix a typo in the repor-ham sieve script, fixes
Pierre Jaury 18834de56e Handle forwards as aliases with local copy
Pierre Jaury 692bcda868 Allow forward to multiple destinations, fixes
Pierre Jaury f2ff1eb955 Remove binary apk and use sieve_imap for antispam learning, fixes
Christoph Rissner b9de28e910 dovecot: use rspamd X-Spamd-Result percentage to evaluate spam
- configures dovecot to use the spamtest sieve plugins
- configures sieve to read the score from X-Spamd-Result: headers
- before.sieve applies the ${spam_threshold} to the spamtest percentage
- freeposte.db stores a percentage for ${spam_threshold}
- migrate freeposte.db spam_threshold from X/15 to percentages

the filter investigates the overall ratio of the `rspamd` header
`X-Spamd-Result` that looks something like this:

X-Spamd-Result: default: True [12.36 / 15.00]
 RBL_SPAMHAUS_XBL(4.00)[]
 BAYES_SPAM(3.06)[92.67%]
 RBL_SPAMHAUS_XBL_ANY(4.00)[]
 ONCE_RECEIVED_STRICT(4.00)[]
 HFILTER_HELO_BAREIP(3.00)[]
 RBL_SORBS_DUL(2.00)[]
 HFILTER_HOSTNAME_UNKNOWN(2.50)[]
 RBL_SPAMHAUS_PBL(2.00)[]
 RBL_SORBS_RECENT(1.50)[]
 MIME_UNKNOWN(0.10)[application/x-rar-compressed]
 RDNS_NONE(1.00)[]
 RBL_SORBS(0.00)[]
 R_SPF_NEUTRAL(0.00)[?all]
 ONCE_RECEIVED(0.10)[]
 RBL_SEM(1.00)[]
 MIME_HTML_ONLY(0.20)[]
 RBL_UCEPROTECT_LEVEL1(1.00)[]
 MIME_GOOD(-0.10)[multipart/mixed]

the sieve `spamtest :percent :value` in this case would be
   100*12.36/15 = 82.4%
Pierre Jaury bfe9ededbc Fix spam filtering when the score is negative
Pierre Jaury 76c33df91f Flatten sieve imports
Pierre Jaury 93f33e956d Filter spam before forward and auto-reply
Pierre Jaury daf8c4bad3 Honor per-user spam settings, fixes
Pierre Jaury 41f343b1da Fix , mark junk messages as read
Pierre Jaury 38cfc3c611 Mark spam messages as seen
Pierre Jaury 988f16f3a4 Change the spam header name
Pierre Jaury dbbad49f66 Handle vacation messages properly
Pierre Jaury 9efc798246 Store the state of reply and forward settings being enabled
Pierre Jaury 3a4703b764 Implement auto-forward and auto-reply
Pierre Jaury f51180415c Put clamav and amavis togther, fix spam filtering
Pierre Jaury d0006dc624 Move to Docker Compose and multiple containers