haraka-plugin-spamassassin 1.0.1 → 1.0.3
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 +15 -1
- package/README.md +0 -1
- package/index.js +3 -7
- package/package.json +10 -6
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
|
4
4
|
|
|
5
5
|
### Unreleased
|
|
6
6
|
|
|
7
|
+
### [1.0.3] - 2025-02-06
|
|
8
|
+
|
|
9
|
+
- results: tidying up duplicate data
|
|
10
|
+
- results.hits: deleted, alias for score
|
|
11
|
+
- results.status: deleted, alias for flag
|
|
12
|
+
- results.flag: change from Yes/No to boolean
|
|
13
|
+
|
|
14
|
+
### [1.0.2] - 2025-01-26
|
|
15
|
+
|
|
16
|
+
- prettier: move config into package.json
|
|
17
|
+
|
|
7
18
|
### [1.0.1] - 2025-01-09
|
|
8
19
|
|
|
9
20
|
- dep(eslint): update to v9
|
|
@@ -12,4 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
|
12
23
|
|
|
13
24
|
- repackaged from haraka/Haraka
|
|
14
25
|
|
|
15
|
-
[1.0.1]: https://github.com/haraka/haraka-plugin-spamassassin/releases/tag/
|
|
26
|
+
[1.0.1]: https://github.com/haraka/haraka-plugin-spamassassin/releases/tag/1.0.1
|
|
27
|
+
[1.0.2]: https://github.com/haraka/haraka-plugin-spamassassin/releases/tag/v1.0.2
|
|
28
|
+
[1.0.0]: https://github.com/haraka/haraka-plugin-spamassassin/releases/tag/1.0.0
|
|
29
|
+
[1.0.3]: https://github.com/haraka/haraka-plugin-spamassassin/releases/tag/v1.0.3
|
package/README.md
CHANGED
package/index.js
CHANGED
|
@@ -82,11 +82,9 @@ exports.hook_data_post = function (next, connection) {
|
|
|
82
82
|
/Spam: (True|False) ; (-?\d+\.\d) \/ (-?\d+\.\d)/,
|
|
83
83
|
)
|
|
84
84
|
if (matches) {
|
|
85
|
-
spamd_response.flag = matches[1]
|
|
85
|
+
spamd_response.flag = matches[1] === 'True'
|
|
86
86
|
spamd_response.score = matches[2]
|
|
87
|
-
spamd_response.hits = matches[2] // backwards compat
|
|
88
87
|
spamd_response.reqd = matches[3]
|
|
89
|
-
spamd_response.flag = spamd_response.flag === 'True' ? 'Yes' : 'No'
|
|
90
88
|
}
|
|
91
89
|
} else {
|
|
92
90
|
state = 'headers'
|
|
@@ -131,7 +129,6 @@ exports.hook_data_post = function (next, connection) {
|
|
|
131
129
|
txn.notes.spamassassin = spamd_response
|
|
132
130
|
connection.results.add(this, {
|
|
133
131
|
time: (Date.now() - start) / 1000,
|
|
134
|
-
hits: spamd_response.hits,
|
|
135
132
|
flag: spamd_response.flag,
|
|
136
133
|
})
|
|
137
134
|
|
|
@@ -197,7 +194,7 @@ exports.munge_subject = function (conn, score) {
|
|
|
197
194
|
}
|
|
198
195
|
|
|
199
196
|
exports.do_header_updates = function (conn, spamd_response) {
|
|
200
|
-
if (spamd_response.flag
|
|
197
|
+
if (spamd_response.flag) {
|
|
201
198
|
// X-Spam-Flag is added by SpamAssassin
|
|
202
199
|
conn.transaction.remove_header('precedence')
|
|
203
200
|
conn.transaction.add_header('Precedence', 'junk')
|
|
@@ -342,7 +339,7 @@ exports.log_results = function (conn, spamd_response) {
|
|
|
342
339
|
: cfg.reject_threshold
|
|
343
340
|
|
|
344
341
|
const human_text =
|
|
345
|
-
`status=${spamd_response.flag}` +
|
|
342
|
+
`status=${spamd_response.flag ? 'Yes' : 'No'}` +
|
|
346
343
|
`, score=${spamd_response.score}` +
|
|
347
344
|
`, required=${spamd_response.reqd}` +
|
|
348
345
|
`, reject=${reject_threshold}` +
|
|
@@ -350,7 +347,6 @@ exports.log_results = function (conn, spamd_response) {
|
|
|
350
347
|
|
|
351
348
|
conn.transaction.results.add(this, {
|
|
352
349
|
human: human_text,
|
|
353
|
-
status: spamd_response.flag,
|
|
354
350
|
score: parseFloat(spamd_response.score),
|
|
355
351
|
required: parseFloat(spamd_response.reqd),
|
|
356
352
|
reject: reject_threshold,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "haraka-plugin-spamassassin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Haraka plugin that scans messages with SpamAssassin",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -33,12 +33,16 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/haraka/haraka-plugin-spamassassin#readme",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"haraka-net-utils": "^1.7.
|
|
37
|
-
"haraka-utils": "^1.1.
|
|
36
|
+
"haraka-net-utils": "^1.7.2",
|
|
37
|
+
"haraka-utils": "^1.1.4"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@haraka/eslint-config": "2.0.2",
|
|
41
|
-
"address-rfc2821": "^2.1.
|
|
42
|
-
"haraka-test-fixtures": "1.3.
|
|
40
|
+
"@haraka/eslint-config": "^2.0.2",
|
|
41
|
+
"address-rfc2821": "^2.1.3",
|
|
42
|
+
"haraka-test-fixtures": "1.3.9"
|
|
43
|
+
},
|
|
44
|
+
"prettier": {
|
|
45
|
+
"singleQuote": true,
|
|
46
|
+
"semi": false
|
|
43
47
|
}
|
|
44
48
|
}
|