haraka-plugin-karma 1.0.11 → 1.0.14
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/.codeclimate.yml +3 -3
- package/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
- package/.github/ISSUE_TEMPLATE/custom.md +10 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/.github/workflows/ci-test-win.yml +38 -0
- package/.github/workflows/ci-test.yml +41 -0
- package/.github/workflows/lint.yml +33 -0
- package/.travis.yml +2 -2
- package/Changes.md +22 -2
- package/README.md +0 -5
- package/appveyor.yml +1 -1
- package/config/karma.ini +1 -1
- package/index.js +111 -92
- package/package.json +7 -7
- package/test/karma.js +473 -441
- package/.npmignore +0 -37
- package/run_tests +0 -33
package/.codeclimate.yml
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**System Info:**
|
|
11
|
+
|
|
12
|
+
Please report your OS, Node version, and Haraka version by running this shell script on your Haraka server and replacing this section with the output.
|
|
13
|
+
|
|
14
|
+
echo "Haraka | $(haraka -v)"; echo " --- | :--- "; echo "Node | $(node -v)"; echo "OS | $(uname -a)"; echo "openssl | $(openssl version)"
|
|
15
|
+
|
|
16
|
+
**Describe the bug**
|
|
17
|
+
A clear and concise description of what the bug is.
|
|
18
|
+
|
|
19
|
+
**Expected behavior**
|
|
20
|
+
A clear and concise description of what you expected to happen.
|
|
21
|
+
|
|
22
|
+
**Observed behavior**
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
**Steps To Reproduce**
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
**Additional context**
|
|
29
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Tests - Windows
|
|
2
|
+
|
|
3
|
+
on: [ push, pull_request ]
|
|
4
|
+
|
|
5
|
+
# no docker/images support on Windows (currently), so run w/o Redis
|
|
6
|
+
# also, stack run commands so test doesn't begin before install completes
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
|
|
10
|
+
ci-test-win:
|
|
11
|
+
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ windows-latest ]
|
|
17
|
+
node-version: [ 14.x, 16.x ]
|
|
18
|
+
fail-fast: false
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v2
|
|
22
|
+
name: Checkout
|
|
23
|
+
with:
|
|
24
|
+
fetch-depth: 1
|
|
25
|
+
|
|
26
|
+
- uses: actions/setup-node@v2
|
|
27
|
+
name: Use Node.js ${{ matrix.node-version }}
|
|
28
|
+
with:
|
|
29
|
+
node-version: ${{ matrix.node-version }}
|
|
30
|
+
|
|
31
|
+
- name: Install
|
|
32
|
+
run: npm install
|
|
33
|
+
|
|
34
|
+
- name: Test
|
|
35
|
+
run: npm run test
|
|
36
|
+
|
|
37
|
+
env:
|
|
38
|
+
CI: true
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on: [ push, pull_request ]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
|
|
7
|
+
ci-test:
|
|
8
|
+
|
|
9
|
+
runs-on: ${{ matrix.os }}
|
|
10
|
+
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
os: [ ubuntu-latest ]
|
|
14
|
+
node-version: [ 14.x, 16.x ]
|
|
15
|
+
fail-fast: false
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v2
|
|
19
|
+
name: Checkout
|
|
20
|
+
with:
|
|
21
|
+
fetch-depth: 1
|
|
22
|
+
|
|
23
|
+
- uses: actions/setup-node@v2
|
|
24
|
+
name: Use Node.js ${{ matrix.node-version }}
|
|
25
|
+
with:
|
|
26
|
+
node-version: ${{ matrix.node-version }}
|
|
27
|
+
|
|
28
|
+
- name: Install
|
|
29
|
+
run: npm install
|
|
30
|
+
|
|
31
|
+
- name: Test
|
|
32
|
+
run: npm run test
|
|
33
|
+
|
|
34
|
+
env:
|
|
35
|
+
CI: true
|
|
36
|
+
|
|
37
|
+
services:
|
|
38
|
+
redis:
|
|
39
|
+
image: redis
|
|
40
|
+
ports:
|
|
41
|
+
- 6379/tcp
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Haraka Lint
|
|
2
|
+
|
|
3
|
+
on: [ push, pull_request ]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
|
|
7
|
+
lint:
|
|
8
|
+
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
node-version: [ 14.x ]
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v2
|
|
17
|
+
name: Checkout
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 1
|
|
20
|
+
|
|
21
|
+
- uses: actions/setup-node@v2
|
|
22
|
+
name: Use Node.js ${{ matrix.node-version }}
|
|
23
|
+
with:
|
|
24
|
+
node-version: ${{ matrix.node-version }}
|
|
25
|
+
|
|
26
|
+
- name: Install
|
|
27
|
+
run: npm install
|
|
28
|
+
|
|
29
|
+
- name: Lint
|
|
30
|
+
run: npm run lint
|
|
31
|
+
|
|
32
|
+
env:
|
|
33
|
+
CI: true
|
package/.travis.yml
CHANGED
package/Changes.md
CHANGED
|
@@ -1,33 +1,53 @@
|
|
|
1
|
+
## 1.0.14 - 2022-02-14
|
|
2
|
+
|
|
3
|
+
- try to unsubscribe in case connection is marked to skip during transaction
|
|
4
|
+
|
|
5
|
+
## 1.0.13 - 2019-04-23
|
|
6
|
+
|
|
7
|
+
- add 'exists' pattern
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 1.0.12 - 2019-03-08
|
|
11
|
+
|
|
12
|
+
- don't interfere with STARTLS and AUTH when karmi is listed above those plugins in config/plugins
|
|
13
|
+
|
|
14
|
+
|
|
1
15
|
## 1.0.11 - 2017-10-25
|
|
2
16
|
|
|
3
|
-
- private addresses and flagged connections exemption
|
|
17
|
+
- private addresses and flagged connections exemption
|
|
18
|
+
|
|
4
19
|
|
|
5
20
|
## 1.0.10 - 2017-08-30
|
|
6
21
|
|
|
7
22
|
- add TLS awards #19
|
|
8
23
|
|
|
24
|
+
|
|
9
25
|
## 1.0.9 - 2017-07-29
|
|
10
26
|
|
|
11
27
|
- splash on some es6
|
|
12
28
|
- add AppVeyor CI testing
|
|
13
29
|
|
|
30
|
+
|
|
14
31
|
## 1.0.8 - 2017-06-26
|
|
15
32
|
|
|
16
33
|
- revert #9, it breaks current Haraka deployments
|
|
17
34
|
|
|
35
|
+
|
|
18
36
|
## 1.0.7 - 2017-06-16
|
|
19
37
|
|
|
20
38
|
- update for eslint 4 compat
|
|
21
39
|
- Add results_redis_publish=true for haraka-results changes #9
|
|
22
40
|
|
|
41
|
+
|
|
23
42
|
## 1.0.6 - 2017-05-04
|
|
24
43
|
|
|
25
44
|
- emit error if redis plugin didn't create connection
|
|
26
45
|
|
|
46
|
+
|
|
27
47
|
## 1.0.5 - 2017-02-06
|
|
28
48
|
|
|
29
49
|
- move merge_redis_ini into load_karma_ini, so it also gets applied
|
|
30
|
-
after a karma.ini change
|
|
50
|
+
after a karma.ini change
|
|
31
51
|
- skip redis operations when no connection exists
|
|
32
52
|
|
|
33
53
|
|
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
[![Build Status][ci-img]][ci-url]
|
|
2
2
|
[![Windows Build Status][ci-win-img]][ci-win-url]
|
|
3
3
|
[![Code Climate][clim-img]][clim-url]
|
|
4
|
-
[![Greenkeeper badge][gk-img]][gk-url]
|
|
5
4
|
[![NPM][npm-img]][npm-url]
|
|
6
5
|
|
|
7
6
|
# Karma - A heuristics based reputation engine for the Haraka MTA
|
|
@@ -216,7 +215,3 @@ Expect to use karma *with* content filters.
|
|
|
216
215
|
[clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-karma
|
|
217
216
|
[npm-img]: https://nodei.co/npm/haraka-plugin-karma.png
|
|
218
217
|
[npm-url]: https://www.npmjs.com/package/haraka-plugin-karma
|
|
219
|
-
[gk-img]: https://badges.greenkeeper.io/haraka/haraka-plugin-karma.svg
|
|
220
|
-
[gk-url]: https://greenkeeper.io/
|
|
221
|
-
|
|
222
|
-
<!-- [![Code Coverage][cov-img]][cov-url] -->
|
package/appveyor.yml
CHANGED
package/config/karma.ini
CHANGED
|
@@ -48,7 +48,7 @@ history_negative=-3
|
|
|
48
48
|
; hooks to disconnect on. When the score is below [threshholds]negative,
|
|
49
49
|
; deny the connection on these hooks:
|
|
50
50
|
;hooks=connect,unrecognized_command,helo,ehlo,mail,rcpt,data,data_post
|
|
51
|
-
hooks=unrecognized_command,data,data_post,queue
|
|
51
|
+
hooks=unrecognized_command,data,data_post,queue,queue_outbound
|
|
52
52
|
|
|
53
53
|
;message=very bad karma score: {score}
|
|
54
54
|
;message=https://example.com/logs/{uuid}
|