haraka-plugin-karma 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/config/karma.ini +1 -6
- package/index.js +11 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
|
4
4
|
|
|
5
5
|
### Unreleased
|
|
6
6
|
|
|
7
|
+
### [2.3.0] - 2026-05-05
|
|
8
|
+
|
|
9
|
+
- allow rspamd to greylist image-only spam
|
|
10
|
+
- allow rspamd to greylist Google Groups messages
|
|
11
|
+
|
|
7
12
|
### [2.2.0] - 2026-03-31
|
|
8
13
|
|
|
9
14
|
#### Added
|
|
@@ -165,3 +170,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
|
165
170
|
[2.1.7]: https://github.com/haraka/haraka-plugin-karma/releases/tag/v2.1.7
|
|
166
171
|
[2.1.8]: https://github.com/haraka/haraka-plugin-karma/releases/tag/v2.1.8
|
|
167
172
|
[2.2.0]: https://github.com/haraka/haraka-plugin-karma/releases/tag/v2.2.0
|
|
173
|
+
[2.3.0]: https://github.com/haraka/haraka-plugin-karma/releases/tag/v2.3.0
|
package/config/karma.ini
CHANGED
|
@@ -64,9 +64,7 @@ hooks=rcpt, queue, queue_outbound
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
[greylist]
|
|
67
|
-
;
|
|
68
|
-
; and rspamd scores exceed their respective thresholds, allow rspamd to
|
|
69
|
-
; greylist (DENYSOFT) instead of karma intercepting the denial.
|
|
67
|
+
; allow rspamd to greylist (DENYSOFT) instead of karma intercepting the denial.
|
|
70
68
|
; This is only relevant when rspamd is NOT in [deny_excludes] plugins.
|
|
71
69
|
;
|
|
72
70
|
; asn[] = 55286 ; ASN numbers eligible for greylisting
|
|
@@ -75,9 +73,6 @@ hooks=rcpt, queue, queue_outbound
|
|
|
75
73
|
;
|
|
76
74
|
; spamassassin_score = SpamAssassin hits score must exceed this value
|
|
77
75
|
; spamassassin_score = 5
|
|
78
|
-
;
|
|
79
|
-
; rspamd_score = rspamd score must exceed this value
|
|
80
|
-
; rspamd_score = 6
|
|
81
76
|
|
|
82
77
|
|
|
83
78
|
[spammy_tlds]
|
package/index.js
CHANGED
|
@@ -402,25 +402,22 @@ exports.should_rspamd_greylist = function (connection) {
|
|
|
402
402
|
|
|
403
403
|
// check SpamAssassin score exceeds configured threshold
|
|
404
404
|
const saScore = parseFloat(
|
|
405
|
-
connection.transaction?.results?.get('spamassassin')?.hits,
|
|
405
|
+
connection.transaction?.results?.get('spamassassin')?.hits ?? 0,
|
|
406
406
|
)
|
|
407
|
-
const saThreshold = parseFloat(this.cfg.greylist?.spamassassin_score)
|
|
408
|
-
if (
|
|
409
|
-
return false
|
|
407
|
+
const saThreshold = parseFloat(this.cfg.greylist?.spamassassin_score ?? 5)
|
|
408
|
+
if (saScore >= saThreshold) return true
|
|
410
409
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
)
|
|
415
|
-
const rspamdThreshold = parseFloat(this.cfg.greylist?.rspamd_score)
|
|
410
|
+
if (connection.transaction.header.get('X-Google-Group-Id')) return true
|
|
411
|
+
|
|
412
|
+
// image-only spam: message body is a single embedded image
|
|
416
413
|
if (
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
414
|
+
connection.transaction.header
|
|
415
|
+
.get('content-type')
|
|
416
|
+
?.startsWith('multipart/related')
|
|
420
417
|
)
|
|
421
|
-
return
|
|
418
|
+
return true
|
|
422
419
|
|
|
423
|
-
return
|
|
420
|
+
return false
|
|
424
421
|
}
|
|
425
422
|
|
|
426
423
|
exports.should_we_deny = function (next, connection, hook) {
|