Skip to content

Commit

Permalink
Merge pull request #1 from haraka/release-1.0.1
Browse files Browse the repository at this point in the history
Release v1.0.1
  • Loading branch information
msimerson authored May 8, 2024
2 parents 7f7baaa + eccb800 commit 76e8ef0
Show file tree
Hide file tree
Showing 11 changed files with 635 additions and 584 deletions.
6 changes: 3 additions & 3 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-8'
config:
config: ".eslintrc.yaml"
config: '.eslintrc.yaml'

ratings:
paths:
- "**.js"
- '**.js'
4 changes: 2 additions & 2 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ env:
mocha: true
es2022: true

extends: ["@haraka"]
extends: ['@haraka']

rules:
no-unused-vars: 1
no-unused-vars: 1
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
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: "CodeQL"
name: 'CodeQL'

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

jobs:
codeql:
Expand Down
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
Submodule .release updated 7 files
+3 −0 CHANGELOG.md
+4 −3 README.md
+8 −0 base.sh
+82 −0 contributors.js
+8 −1 finish.sh
+36 −5 start.sh
+29 −17 submit.sh
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).

### Unreleased

### [1.0.1] - 2024-05-08

- chore: formatting

### [1.0.0] - 2024-05-08

- initial release (repackaged from haraka/Haraka)

[1.0.0]: https://github.com/haraka/haraka-plugin-template/releases/tag/v1.0.0
[1.0.0]: https://github.com/haraka/haraka-plugin-clamd/releases/tag/v1.0.0
[1.0.1]: https://github.com/haraka/haraka-plugin-clamd/releases/tag/v1.0.1
111 changes: 53 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,60 +20,55 @@ $EDITOR config/clamd.ini

The following options can be defined in clamd.ini;

### clamd\_socket (default: localhost:3310)
### clamd_socket (default: localhost:3310)

N.N.N.N:port, [ipv6::literal]:port, host:port or /path/to/socket of
the clamd daemon.
N.N.N.N:port, [ipv6::literal]:port, host:port or /path/to/socket of
the clamd daemon.

Multiple hosts can be listed separated by comma, semi-colon or spaces.
Multiple hosts can be listed separated by comma, semi-colon or spaces.

If :port is omitted it defaults to 3310.
If :port is omitted it defaults to 3310.

On connection error or timeout the next host in the list will be tried.
When the host list is exhausted, the message will be deferred with
a temporary failure.
On connection error or timeout the next host in the list will be tried.
When the host list is exhausted, the message will be deferred with
a temporary failure.

### randomize_host_order (default: false)

### randomize\_host\_order (default: false)
If this is set then the list of hosts with be randomized before a
connection is attempted.

If this is set then the list of hosts with be randomized before a
connection is attempted.
### only_with_attachments (default: false)

Set this option to only scan messages that contain non-textual
attachments. This is a performance optimization, however it will
prevent ClamAV from detecting threats such as Phishing in plain-text
or HTML messages.

### only\_with\_attachments (default: false)
### connect_timeout (default: 10)

Set this option to only scan messages that contain non-textual
attachments. This is a performance optimization, however it will
prevent ClamAV from detecting threats such as Phishing in plain-text
or HTML messages.
Timeout connection to host after this many seconds. A timeout will
cause the next host in the list to be tried. Once all hosts have
been tried then a temporary failure will be returned.

### timeout (default: 30)

### connect\_timeout (default: 10)
Post-connection timeout if there is no activity on the socket after
this many seconds. A timeout will cause the message to be rejected
with a tempoary failure.

Timeout connection to host after this many seconds. A timeout will
cause the next host in the list to be tried. Once all hosts have
been tried then a temporary failure will be returned.
### max_size (default: 26214400)


### timeout (default: 30)

Post-connection timeout if there is no activity on the socket after
this many seconds. A timeout will cause the message to be rejected
with a tempoary failure.


### max\_size (default: 26214400)

The maximum size of message that should be sent to clamd in bytes.
This option should not be larger than the StreamMaxLength value in
clamd.conf as clamd will stop scanning once this limit is reached.
If the clamd limit is reached the plug-in will log a notice that
this has happened and will allow the message though.
The maximum size of message that should be sent to clamd in bytes.
This option should not be larger than the StreamMaxLength value in
clamd.conf as clamd will stop scanning once this limit is reached.
If the clamd limit is reached the plug-in will log a notice that
this has happened and will allow the message though.

### [reject]

An optional reject section can offer control over when to reject connections.
The default settings are shown. ClamAV recommends that hits coming from
The default settings are shown. ClamAV recommends that hits coming from
SafeBrowsing / Phishing / Heuristics, Potentially Unwanted Applications, and
UNOFFICIAL be used only for scoring.

Expand All @@ -97,53 +92,53 @@ The following options are enabled by default in clamd but ClamAV suggests
using them only for scoring.

* Phishing=false

## [check]

The optional check section can allow skipping ClamAV check for remote connection
meeting following criteria.

- authenticated

Default: true
Default: true

If true, messages from authenticated users will be scanned.
If true, messages from authenticated users will be scanned.

- private\_ip
- private_ip

Default: true
Default: true

If true, messages from private IPs will be scanned.
If true, messages from private IPs will be scanned.

- local\_ip
- local_ip

Default: true
Default: true

If true, messages from localhost will be scanned.
If true, messages from localhost will be scanned.

- relay

Default: true
Default: true

If true, messages that are to be relayed will be scanned.
If true, messages that are to be relayed will be scanned.

## clamd.excludes

This file can contain a list of virus name patterns that when matched, are
not rejected by this plugin. An X-Haraka-Virus: header will be inserted
containing the virus name. This header can then be used for scoring
in other plugins.
This file can contain a list of virus name patterns that when matched, are
not rejected by this plugin. An X-Haraka-Virus: header will be inserted
containing the virus name. This header can then be used for scoring
in other plugins.

The format of the file is one pattern per line. Comments are prefixed
with #. Matches are case-insensitive.
The format of the file is one pattern per line. Comments are prefixed
with #. Matches are case-insensitive.

Patterns are expressed using wildcards (e.g. * and ?) or
via regexp by enclosing the pattern in //.
Patterns are expressed using wildcards (e.g. \* and ?) or
via regexp by enclosing the pattern in //.

To negate a match (e.g. reject if it matches), prefix the match with !.
Negative matches are always tested first.
To negate a match (e.g. reject if it matches), prefix the match with !.
Negative matches are always tested first.

Example:
Example:

```
# Always reject test signatures
Expand Down
Loading

0 comments on commit 76e8ef0

Please sign in to comment.