Skip to content

Commit

Permalink
Release v1.0.15 (#35)
Browse files Browse the repository at this point in the history
- doc: mv Changes.md CHANGELOG.md
- populate [files] in package.json.
- dep(eslint): upgrade to v9
- doc(CONTRIBUTORS): added
- ci: use shared Haraka workflows
- style(prettier): added
  • Loading branch information
msimerson authored Jan 31, 2025
1 parent 8765f9f commit 0a5486d
Show file tree
Hide file tree
Showing 14 changed files with 345 additions and 335 deletions.
8 changes: 4 additions & 4 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
engines:
eslint:
enabled: true
channel: "eslint-8"
channel: 'eslint-9'
config:
config: ".eslintrc.yaml"
config: 'eslint.config.mjs'

ratings:
paths:
- "**.js"
paths:
- '**.js'
21 changes: 0 additions & 21 deletions .eslintrc.yaml

This file was deleted.

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: "weekly"
interval: 'weekly'
allow:
- dependency-type: production
33 changes: 7 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,22 @@
name: CI

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

env:
CI: true

jobs:

lint:
uses: haraka/.github/.github/workflows/lint.yml@master

# coverage:
# uses: haraka/.github/.github/workflows/coverage.yml@master
# secrets: inherit

test:
needs: [ lint, get-lts ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
node-version: ${{ fromJson(needs.get-lts.outputs.active) }}
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
ubuntu:
needs: [lint]
uses: haraka/.github/.github/workflows/ubuntu.yml@master

get-lts:
runs-on: ubuntu-latest
steps:
- id: get
uses: msimerson/node-lts-versions@v1
outputs:
active: ${{ steps.get.outputs.active }}
lts: ${{ steps.get.outputs.lts }}
windows:
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
2 changes: 1 addition & 1 deletion .release
90 changes: 90 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Changelog

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

### Unreleased

### [1.0.15] - 2025-01-31

- doc: mv Changes.md CHANGELOG.md
- populate [files] in package.json.
- dep(eslint): upgrade to v9
- doc(CONTRIBUTORS): added
- ci: use shared Haraka workflows
- style(prettier): added

### [1.0.14] - 2023-12-12

- style: remove useless variable
- ci(publish): constrain to when package.json changes
- ci: run on PR

### [1.0.13] - 2022-06-05

- doc(README): update CI badge URL
- ci: update dependabot config to production only

### [1.0.12] - 2022-06-05

- ci: update GHA workflow with shared
- ci: add submodule .release

### 1.0.11 - 2022-03-31

- node 12 EOL, drop testing.

### 1.0.10 - 2019-03-22

- Add an 'if' to "blocked message" HTML header
- CI testing updates (node.js versions)
- moved config/karma.ini to test/config/karma.ini

### 1.0.9 - 2017-08-17

- also prune syslog hostname when no PID in entry

### 1.0.8 - 2017-06-16

- depend on haraka-eslint for rules
- lint fixes

### 1.0.7 - 2017-05-04

- add --text flag to grep call, in case log file has binary chars

### 1.0.6 - 2017-01-23

- remove host & pid detail from syslog lines

### 1.0.5 - 2016-11-04

- display log entries for transactions
- display just transaction ID in place of full UUID.id
- refactored most of get logs into grepWithShell & asHtml
- with test coverage for the latter two

### 1.0.4 - 2016-10-25

- remove useless $UUID token from display

### Oct 2 12:57:42 2016

- trim uuids more reliably (#4)

### Oct 2 12:08:44 2016

- Duplicate resolutions (#2)
- suppress duplicate actions

### Sep 29 23:10:33 2016

- add missing eslint definition
- added README
- add .travis.yml
- initial commit

[1.0.11]: https://github.com/haraka/haraka-plugin-log-reader/releases/tag/1.0.11
[1.0.12]: https://github.com/haraka/haraka-plugin-log-reader/releases/tag/1.0.12
[1.0.13]: https://github.com/haraka/haraka-plugin-log-reader/releases/tag/1.0.13
[1.0.14]: https://github.com/haraka/haraka-plugin-log-reader/releases/tag/v1.0.14
[1.0.15]: https://github.com/haraka/haraka-plugin-log-reader/releases/tag/v1.0.15
9 changes: 9 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 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-log-reader/commits?author=msimerson">32</a>) |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |

<sub>this file is generated by [.release](https://github.com/msimerson/.release).
Contribute to this project to get your GitHub profile included here.</sub>
90 changes: 0 additions & 90 deletions Changes.md

This file was deleted.

41 changes: 16 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,54 @@

# haraka-plugin-log-reader


extracts matching log entries from the haraka log file


# Install


````
```
cd /my/haraka/config/dir
npm install haraka-plugin-log-reader
````

```

## Enable

Add `log-reader` to `haraka/config/plugins` file.


# Usage

When enabled, this plugin registers two URL routes in Haraka's http server:

* karma/rules
* /logs/:uuid
- karma/rules
- /logs/:uuid

The former rule simply returns a list of the Haraka rules in use. The http client uses those rules (the ID, reason, and value) to display the `Policy Rules` and `Steps to Resolve` sections in the web page.

# Example


### Sorry we blocked your message:

Our filters mistook your server for a malicious computer attempting to send spam. To improve your mail servers reputation, please contact your IT helpdesk or Systems Administrator and ask them for help.

----------
---

### Policy Rules

* -7, DNS Blacklist (b.barracudacentral.org)
* -5, DNS Blacklist (zen.spamhaus.org)
* -3, DNS Blacklist (dnsbl-1.uceprotect.net)
* -3, DNS Blacklist (bl.spamcop.net)
* -3, ASN reputation is spam-only (asn_all_bad)
* -1, Geographic distance is unusual for ham (4000)
* -1, Geographic distance is unusual for ham (8000)
* -1, ASN reputation is bad (karma)
- -7, DNS Blacklist (b.barracudacentral.org)
- -5, DNS Blacklist (zen.spamhaus.org)
- -3, DNS Blacklist (dnsbl-1.uceprotect.net)
- -3, DNS Blacklist (bl.spamcop.net)
- -3, ASN reputation is spam-only (asn_all_bad)
- -1, Geographic distance is unusual for ham (4000)
- -1, Geographic distance is unusual for ham (8000)
- -1, ASN reputation is bad (karma)

----------
---

### Steps to Resolve

* Disinfect your host/network
- Disinfect your host/network

----------
---

## Raw Logs

Expand All @@ -75,12 +69,9 @@ Our filters mistook your server for a malicious computer attempting to send spam
[NOTICE] [core] disconnect ip=95.160.74.108 rdns="095160074108.gdansk.vectranet.pl" helo="" relay=N early=N esmtp=N tls=N pipe=N errors=0 txns=0 rcpts=0/0/0 msgs=0/0/0 bytes=0 lr="" time=12.752
</pre></html>


[ci-img]: https://github.com/haraka/haraka-plugin-log-reader/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/haraka/haraka-plugin-log-reader/actions/workflows/ci.yml
[cov-img]: https://codecov.io/github/haraka/haraka-plugin-log-reader/coverage.svg
[cov-url]: https://codecov.io/github/haraka/haraka-plugin-log-reader
[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-log-reader/badges/gpa.svg
[clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-log-reader
[npm-img]: https://nodei.co/npm/haraka-plugin-log-reader.png
[npm-url]: https://www.npmjs.com/package/haraka-plugin-log-reader
Loading

0 comments on commit 0a5486d

Please sign in to comment.