Skip to content

Commit

Permalink
Release v1.0.2 (#4)
Browse files Browse the repository at this point in the history
- dep: eslint-plugin-haraka -> @haraka/eslint-config
- populate [files] in package.json. Delete .npmignore.
- doc(CHANGE): renamed Changes.md -> CHANGELOG.md
- doc(CONTRIBUTORS): added
- prettier
  • Loading branch information
msimerson authored Apr 10, 2024
1 parent a5e9ee4 commit d5720ee
Show file tree
Hide file tree
Showing 18 changed files with 271 additions and 315 deletions.
8 changes: 4 additions & 4 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
engines:
eslint:
enabled: true
channel: "eslint-8"
channel: 'eslint-8'
config:
config: ".eslintrc.yaml"
config: '.eslintrc.yaml'

ratings:
paths:
- "**.js"
paths:
- '**.js'

checks:
return-statements:
Expand Down
22 changes: 2 additions & 20 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,6 @@ env:
node: true
es6: true
mocha: true
es2020: true
es2022: true

plugins:
- haraka

extends:
- eslint:recommended
- plugin:haraka/recommended

rules:
indent: [2, 2, {"SwitchCase": 1}]

root: true

globals:
OK: true
CONT: true
DENY: true
DENYSOFT: true
DENYDISCONNECT: true
DENYSOFTDISCONNECT: true
extends: ['@haraka']
5 changes: 3 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Changes proposed in this pull request:

-
-
-
-

Fixes #

Checklist:

- [ ] docs updated
- [ ] tests updated
- [ ] Changes.md updated
Expand Down
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "monthly"
interval: 'monthly'
allow:
- dependency-type: production
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on: [ push, pull_request ]
on: [push, pull_request]

env:
CI: true
Expand All @@ -14,9 +14,9 @@ jobs:
# secrets: inherit

ubuntu:
needs: [ lint ]
needs: [lint]
uses: haraka/.github/.github/workflows/ubuntu.yml@master

windows:
needs: [ lint ]
needs: [lint]
uses: haraka/.github/.github/workflows/windows.yml@master
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]
schedule:
- cron: '18 7 * * 4'

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ jobs:
publish:
uses: haraka/.github/.github/workflows/publish.yml@master
secrets: inherit

59 changes: 0 additions & 59 deletions .npmignore

This file was deleted.

2 changes: 2 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
singleQuote: true
semi: false
2 changes: 1 addition & 1 deletion .release
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog

The format is based on [Keep a Changelog](https://keepachangelog.com/).

### Unreleased

### [1.0.2] - 2024-04-09

- dep: eslint-plugin-haraka -> @haraka/eslint-config
- populate [files] in package.json. Delete .npmignore.
- doc(CHANGE): renamed Changes.md -> CHANGELOG.md
- doc(CONTRIBUTORS): added
- prettier
- feat: add timeout to DNS Resolver #2

## 1.0.0 - 2023-12-15

- Initial release

[1.0.1]: https://github.com/haraka/haraka-plugin-dns-list/releases/tag/1.0.1
[1.0.2]: https://github.com/haraka/haraka-plugin-dns-list/releases/tag/1.0.2
8 changes: 8 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Contributors

This handcrafted artisinal software is brought to you by:

| <img height="80" src="https://avatars.githubusercontent.com/u/261635?v=4"><br><a href="https://github.com/msimerson">msimerson</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=msimerson">4</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/203240?v=4"><br><a href="https://github.com/lnedry">lnedry</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=lnedry">1</a>) |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |

<sub>this file is maintained by [.release](https://github.com/msimerson/.release)</sub>
3 changes: 0 additions & 3 deletions Changes.md

This file was deleted.

37 changes: 15 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,16 @@ Looks up the IP address of the remote host in DNS lists. There are several types

Block lists (aka: DNSBL) are designed to be used for blocking mail from any host listed in them. Block lists are the most common DNS list type and lists without a type specified are considered block lists. The default action for block lists is to reject the connection. This can be changed by setting `reject=false` in the zone's settings block.


### allow

When the remote IP is found in an allow list, this plugin returns OK for the ehlo, helo, and mail hooks.

IMPORTANT! The order of plugins in config/plugins is important when this feature is used. It should be listed *before* any plugins that you wish to skip, but after any plugins that accept recipients.
IMPORTANT! The order of plugins in config/plugins is important when this feature is used. It should be listed _before_ any plugins that you wish to skip, but after any plugins that accept recipients.

### karma

Karma lists can have different results for IPs beyond a simple block or allow. See [hostkarma.junkemailfilter.com](https://hostkarma.junkemailfilter.com) for details.


## INSTALL

```sh
Expand All @@ -34,7 +32,7 @@ echo "dns-list" >> config/plugins
service haraka restart
```

### Configuration
## Configure

If the default configuration is insufficient, copy the config file from the distribution into your haraka config dir and modify it:

Expand All @@ -51,31 +49,28 @@ Check every DNS zone every `N` minutes. When the value is less than 5, checks wi

The checks confirm that lists are responding correctly. When errors are detected, the zone is disabled and will be checked at the next interval. When a zone resumes working correctly it will be enabled.


#### [main] zones

An array or comma separated list of zones to query.


#### [main] search: (default: all)

- first: consider first DNS list response conclusive. End processing.
- all: process all DNS list results

- all: process all DNS list results

#### [stats] enable=true

This feature requires the 'redis' plugin. When enabled, this will record several list statistics to redis:
This feature requires the [redis](https://github.com/haraka/haraka-plugin-redis) plugin. When enabled, this will record several list statistics to redis:

- the total number of queries (TOTAL)
- the average response time (AVG\_RT)
- the average response time (AVG_RT)
- the return type (e.g. LISTED or ERROR)

to a redis hash where the key is 'dns-list-stat:zone' and the hash field is the response type.
to a redis hash where the key is `dns-list-stat:zone` and the hash field is the response type.

It will also track the positive response overlap between the lists in another redis hash where the key is 'dns-list-overlap:zone' and the hash field is the other list names. Example:
It will also track the positive response overlap between the lists in another redis hash where the key is `dns-list-overlap:zone` and the hash field is the other list names. Example:

````
```
redis 127.0.0.1:6379> hgetall dns-list-stat:zen.spamhaus.org
1) "TOTAL"
2) "23"
Expand All @@ -93,21 +88,19 @@ redis 127.0.0.1:6379> hgetall dns-list-overlap:zen.spamhaus.org
4) "1"
5) "TOTAL"
6) "1"
````
```

#### [stats] redis\_host
#### [stats] redis_host

In the form of `host:port` this option allows you to specify a different host on which redis runs.


### Per-Zone DNS list settings

The exact name of the DNS zone (as specified above in main.zones) may contain settings about that DNS list.

* type=[ block, allow, karma ]
* reject=true (default: true) Reject connections from IPs on block lists. Setting this to false makes dnsbl informational. reject=false is best used in conjunction with plugins like [karma](/manual/plugins/karma.html) that employ a scoring engine to make choices about message delivery.
* ipv6=true | false
The exact name of the DNS zone (as specified above in main.zones) may contain settings about that DNS list.

- type=[ block, allow, karma ]
- reject=true (default: true) Reject connections from IPs on block lists. Setting this to false makes dnsbl informational. reject=false is best used in conjunction with plugins like [karma](https://github.com/haraka/haraka-plugin-karma) that employ a scoring engine to make choices about message delivery.
- ipv6=true | false

[ci-img]: https://github.com/haraka/haraka-plugin-dns-list/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/haraka/haraka-plugin-dns-list/actions/workflows/ci.yml
Expand Down
2 changes: 1 addition & 1 deletion config/dns-list.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[main]

; periodically check each DNS list, disabling ones that fail checks
periodic_checks = 30
periodic_checks=30

; zones: an array or a comma separated list of DNS zones
;
Expand Down
Loading

0 comments on commit d5720ee

Please sign in to comment.