haraka-plugin-karma 1.0.12 → 2.0.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/.codeclimate.yml CHANGED
@@ -1,10 +1,25 @@
1
1
  engines:
2
2
  eslint:
3
3
  enabled: true
4
- channel: "eslint-4"
4
+ channel: "eslint-8"
5
5
  config:
6
6
  config: ".eslintrc.yaml"
7
7
 
8
+ checks:
9
+ return-statements:
10
+ enabled: false
11
+ similar-code:
12
+ enabled: false
13
+ method-lines:
14
+ config:
15
+ threshold: 50
16
+ method-complexity:
17
+ config:
18
+ threshold: 20
19
+ file-lines:
20
+ config:
21
+ threshold: 900
22
+
8
23
  ratings:
9
24
  paths:
10
25
  - "**.js"
package/.eslintrc.yaml CHANGED
@@ -2,6 +2,7 @@ env:
2
2
  node: true
3
3
  es6: true
4
4
  mocha: true
5
+ es2020: true
5
6
 
6
7
  plugins: [ haraka ]
7
8
 
@@ -11,6 +12,8 @@ root: true
11
12
 
12
13
  rules:
13
14
  indent: [2, 2, { SwitchCase: 1 } ]
15
+ semi: [ error, never ]
16
+ semi-style: [ error, last ]
14
17
 
15
18
  globals:
16
19
  OK: true
@@ -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,10 @@
1
+ ---
2
+ name: Custom issue template
3
+ about: Issues that aren't bug reports or feature requests
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+
@@ -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,48 @@
1
+ name: CI
2
+
3
+ on: [ push ]
4
+
5
+ env:
6
+ CI: true
7
+
8
+ jobs:
9
+
10
+ lint:
11
+ uses: haraka/.github/.github/workflows/lint.yml@master
12
+
13
+ test:
14
+ runs-on: ${{ matrix.os }}
15
+ services:
16
+ redis:
17
+ image: redis
18
+ ports:
19
+ - 6379/tcp
20
+ strategy:
21
+ matrix:
22
+ os: [ ubuntu-latest ]
23
+ node-version: [ 14, 16, 18 ]
24
+ fail-fast: false
25
+ steps:
26
+ - uses: actions/checkout@v2
27
+ - uses: actions/setup-node@v3
28
+ name: Node.js ${{ matrix.node-version }}
29
+ with:
30
+ node-version: ${{ matrix.node-version }}
31
+ - run: npm install
32
+ - run: npm test
33
+
34
+ test-win:
35
+ runs-on: ${{ matrix.os }}
36
+ strategy:
37
+ matrix:
38
+ os: [ windows-latest ]
39
+ node-version: [ 14, 16, 18 ]
40
+ fail-fast: false
41
+ steps:
42
+ - uses: actions/checkout@v3
43
+ - uses: actions/setup-node@v3
44
+ name: Use Node.js ${{ matrix.node-version }}
45
+ with:
46
+ node-version: ${{ matrix.node-version }}
47
+ - run: npm install
48
+ - run: npm test
@@ -0,0 +1,29 @@
1
+ name: publish
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ env:
9
+ CI: true
10
+
11
+ jobs:
12
+ publish:
13
+ uses: haraka/.github/.github/workflows/publish.yml@master
14
+ secrets: inherit
15
+
16
+ publish-gpr:
17
+ runs-on: ubuntu-latest
18
+ permissions:
19
+ contents: read
20
+ packages: write
21
+ steps:
22
+ - uses: actions/checkout@v3
23
+ - uses: actions/setup-node@v3
24
+ with:
25
+ node-version: 16
26
+ registry-url: https://npm.pkg.github.com/
27
+ - run: npm publish
28
+ env:
29
+ NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/Changes.md CHANGED
@@ -1,33 +1,59 @@
1
+
2
+
3
+ ## 2.0.0 - 2022-03-29
4
+
5
+ - remove lots of plugin=this
6
+ - remove unnecessary braces and trailing ;
7
+ - some promises.
8
+
9
+
10
+ ## 1.0.14 - 2022-02-14
11
+
12
+ - try to unsubscribe in case connection is marked to skip during transaction
13
+
14
+
15
+ ## 1.0.13 - 2019-04-23
16
+
17
+ - add 'exists' pattern
18
+
19
+
1
20
  ## 1.0.12 - 2019-03-08
2
21
 
3
22
  - don't interfere with STARTLS and AUTH when karmi is listed above those plugins in config/plugins
4
23
 
24
+
5
25
  ## 1.0.11 - 2017-10-25
6
26
 
7
27
  - private addresses and flagged connections exemption
8
28
 
29
+
9
30
  ## 1.0.10 - 2017-08-30
10
31
 
11
32
  - add TLS awards #19
12
33
 
34
+
13
35
  ## 1.0.9 - 2017-07-29
14
36
 
15
37
  - splash on some es6
16
38
  - add AppVeyor CI testing
17
39
 
40
+
18
41
  ## 1.0.8 - 2017-06-26
19
42
 
20
43
  - revert #9, it breaks current Haraka deployments
21
44
 
45
+
22
46
  ## 1.0.7 - 2017-06-16
23
47
 
24
48
  - update for eslint 4 compat
25
49
  - Add results_redis_publish=true for haraka-results changes #9
26
50
 
51
+
27
52
  ## 1.0.6 - 2017-05-04
28
53
 
29
54
  - emit error if redis plugin didn't create connection
30
55
 
56
+
31
57
  ## 1.0.5 - 2017-02-06
32
58
 
33
59
  - move merge_redis_ini into load_karma_ini, so it also gets applied
package/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  [![Build Status][ci-img]][ci-url]
2
- [![Windows Build Status][ci-win-img]][ci-win-url]
3
2
  [![Code Climate][clim-img]][clim-url]
4
- [![Greenkeeper badge][gk-img]][gk-url]
5
3
  [![NPM][npm-img]][npm-url]
6
4
 
7
5
  # Karma - A heuristics based reputation engine for the Haraka MTA
@@ -205,18 +203,13 @@ Expect to use karma *with* content filters.
205
203
  [snf-url]: http://haraka.github.io/manual/plugins/messagesniffer.html
206
204
  [results-url]: http://haraka.github.io/manual/Results.html
207
205
 
206
+ [![CI]()]()
208
207
 
209
- [ci-img]: https://travis-ci.org/haraka/haraka-plugin-karma.svg
210
- [ci-url]: https://travis-ci.org/haraka/haraka-plugin-karma
211
- [ci-win-img]: https://ci.appveyor.com/api/projects/status/eut008hijj7gt995?svg=true
212
- [ci-win-url]: https://ci.appveyor.com/project/msimerson/haraka-plugin-karma
208
+ [ci-img]: https://github.com/haraka/haraka-plugin-karma/actions/workflows/ci.yml/badge.svg
209
+ [ci-url]: https://github.com/haraka/haraka-plugin-karma/actions/workflows/ci.yml
213
210
  [cov-img]: https://codecov.io/github/haraka/haraka-plugin-karma/coverage.svg
214
211
  [cov-url]: https://codecov.io/github/haraka/haraka-plugin-karma
215
212
  [clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-karma/badges/gpa.svg
216
213
  [clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-karma
217
214
  [npm-img]: https://nodei.co/npm/haraka-plugin-karma.png
218
215
  [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/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}