haraka-plugin-karma 2.5.1 → 2.5.2
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/README.md +10 -10
- package/index.js +2 -2
- package/package.json +10 -8
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.5.2] - 2026-06-07
|
|
8
|
+
|
|
9
|
+
- fix: update redis hmSet -> hSet
|
|
10
|
+
- test: refactored against test-fixtures 1.7.0 (#72)
|
|
11
|
+
|
|
7
12
|
### [2.5.1] - 2026-05-24
|
|
8
13
|
|
|
9
14
|
- fix: guard pubsub JSON.parse and validate payload shape in check_result
|
|
@@ -195,3 +200,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
|
195
200
|
[2.4.1]: https://github.com/haraka/haraka-plugin-karma/releases/tag/v2.4.1
|
|
196
201
|
[2.5.0]: https://github.com/haraka/haraka-plugin-karma/releases/tag/v2.5.0
|
|
197
202
|
[2.5.1]: https://github.com/haraka/haraka-plugin-karma/releases/tag/v2.5.1
|
|
203
|
+
[2.5.2]: https://github.com/haraka/haraka-plugin-karma/releases/tag/v2.5.2
|
package/README.md
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
[![Build Status][ci-img]][ci-url]
|
|
2
|
-
[![Code Climate][clim-img]][clim-url]
|
|
3
|
-
[![Code Coverage][cov-img]][cov-url]
|
|
4
|
-
|
|
5
1
|
# Karma - A heuristics based reputation engine for the Haraka MTA
|
|
6
2
|
|
|
3
|
+
[![Test][ci-img]][ci-url] [![Cover][cov-img]][cov-url] [![Qlty][qlty-img]][qlty-url]
|
|
4
|
+
|
|
7
5
|
Karma is a heuristic scoring engine that uses connection metadata and other Haraka plugin data as inputs. Connections scoring in excess of specified thresholds are rewarded or [penalized](#penalties) in proportionate ways.
|
|
8
6
|
|
|
9
7
|
## Description
|
|
@@ -186,6 +184,14 @@ Karma is most effective at filtering mail delivered by bots and rogue servers.
|
|
|
186
184
|
Spam delivered by servers with good reputations normally pass karma's checks.
|
|
187
185
|
Expect to use karma _with_ content filters.
|
|
188
186
|
|
|
187
|
+
<!-- leave these buried at the bottom of the document -->
|
|
188
|
+
|
|
189
|
+
[ci-img]: https://github.com/haraka/haraka-plugin-karma/actions/workflows/ci.yml/badge.svg
|
|
190
|
+
[ci-url]: https://github.com/haraka/haraka-plugin-karma/actions/workflows/ci.yml
|
|
191
|
+
[cov-img]: https://codecov.io/github/haraka/haraka-plugin-karma/coverage.svg
|
|
192
|
+
[cov-url]: https://codecov.io/github/haraka/haraka-plugin-karma
|
|
193
|
+
[qlty-img]: https://qlty.sh/gh/haraka/projects/haraka-plugin-karma/maintainability.svg
|
|
194
|
+
[qlty-url]: https://qlty.sh/gh/haraka/projects/haraka-plugin-karma
|
|
189
195
|
[p0f-url]: /manual/plugins/connect.p0f.html
|
|
190
196
|
[geoip-url]: https://github.com/haraka/haraka-plugin-geoip
|
|
191
197
|
[dnsbl-url]: /manual/plugins/dnsbl.html
|
|
@@ -194,9 +200,3 @@ Expect to use karma _with_ content filters.
|
|
|
194
200
|
[sa-url]: http://haraka.github.io/manual/plugins/spamassassin.html
|
|
195
201
|
[snf-url]: http://haraka.github.io/manual/plugins/messagesniffer.html
|
|
196
202
|
[results-url]: http://haraka.github.io/manual/Results.html
|
|
197
|
-
[ci-img]: https://github.com/haraka/haraka-plugin-karma/actions/workflows/ci.yml/badge.svg
|
|
198
|
-
[ci-url]: https://github.com/haraka/haraka-plugin-karma/actions/workflows/ci.yml
|
|
199
|
-
[cov-img]: https://codecov.io/github/haraka/haraka-plugin-karma/coverage.svg
|
|
200
|
-
[cov-url]: https://codecov.io/github/haraka/haraka-plugin-karma
|
|
201
|
-
[clim-img]: https://qlty.sh/gh/haraka/projects/haraka-plugin-karma/maintainability.svg
|
|
202
|
-
[clim-url]: https://qlty.sh/gh/haraka/projects/haraka-plugin-karma
|
package/index.js
CHANGED
|
@@ -1042,7 +1042,7 @@ exports.init_ip = async function (dbkey, rip, expire) {
|
|
|
1042
1042
|
if (!this.db) return
|
|
1043
1043
|
await this.db
|
|
1044
1044
|
.multi()
|
|
1045
|
-
.
|
|
1045
|
+
.hSet(dbkey, { bad: 0, good: 0, connections: 1 })
|
|
1046
1046
|
.expire(dbkey, expire)
|
|
1047
1047
|
.exec()
|
|
1048
1048
|
}
|
|
@@ -1059,7 +1059,7 @@ exports.init_asn = function (asnkey, expire) {
|
|
|
1059
1059
|
if (!this.db) return
|
|
1060
1060
|
this.db
|
|
1061
1061
|
.multi()
|
|
1062
|
-
.
|
|
1062
|
+
.hSet(asnkey, { bad: 0, good: 0, connections: 1 })
|
|
1063
1063
|
.expire(asnkey, expire * 2) // keep ASN longer
|
|
1064
1064
|
.exec()
|
|
1065
1065
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "haraka-plugin-karma",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"description": "A heuristics scoring and reputation engine for SMTP connections",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -8,15 +8,17 @@
|
|
|
8
8
|
"config"
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
|
+
"prepare": "git rev-parse --git-dir >/dev/null 2>&1 && git config core.hooksPath .githooks || true",
|
|
11
12
|
"clean": "rm -rf node_modules package-lock.json",
|
|
12
13
|
"format": "npm run prettier:fix && npm run lint:fix",
|
|
13
14
|
"lint": "npx eslint *.js test",
|
|
14
15
|
"lint:fix": "npx eslint *.js test --fix",
|
|
15
16
|
"prettier": "npx prettier . --check",
|
|
16
17
|
"prettier:fix": "npx prettier . --write --log-level=warn",
|
|
18
|
+
"qlty": "qlty smells --all",
|
|
17
19
|
"test": "node --test",
|
|
18
|
-
"test:coverage": "node --test --experimental-test-coverage --test-coverage-
|
|
19
|
-
"test:coverage:lcov": "mkdir -p coverage && node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=coverage/lcov.info test/*.js",
|
|
20
|
+
"test:coverage": "node --test --experimental-test-coverage --test-coverage-include=index.js",
|
|
21
|
+
"test:coverage:lcov": "mkdir -p coverage && node --test --experimental-test-coverage --test-coverage-include=index.js --test-reporter=lcov --test-reporter-destination=coverage/lcov.info test/*.js",
|
|
20
22
|
"versions": "npx npm-dep-mgr check",
|
|
21
23
|
"versions:fix": "npx npm-dep-mgr update"
|
|
22
24
|
},
|
|
@@ -34,13 +36,13 @@
|
|
|
34
36
|
},
|
|
35
37
|
"homepage": "https://github.com/haraka/haraka-plugin-karma#readme",
|
|
36
38
|
"dependencies": {
|
|
37
|
-
"haraka-constants": "^1.0.
|
|
38
|
-
"haraka-plugin-redis": "^2.0
|
|
39
|
+
"haraka-constants": "^1.0.8",
|
|
40
|
+
"haraka-plugin-redis": "^2.1.0"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|
|
41
|
-
"@haraka/email-address": "^3.1.
|
|
42
|
-
"@haraka/eslint-config": "^
|
|
43
|
-
"haraka-test-fixtures": "^1.
|
|
43
|
+
"@haraka/email-address": "^3.1.6",
|
|
44
|
+
"@haraka/eslint-config": "^3.0.0",
|
|
45
|
+
"haraka-test-fixtures": "^1.7.1"
|
|
44
46
|
},
|
|
45
47
|
"prettier": {
|
|
46
48
|
"singleQuote": true,
|