Skip to content

Commit

Permalink
updates with name fixes for a handful of plugins (#49)
Browse files Browse the repository at this point in the history
Is there a mechanism for these pages to get updated with the README from NPM packaged plugins?
  • Loading branch information
msimerson authored Jan 8, 2025
1 parent 327881c commit 4c0196a
Show file tree
Hide file tree
Showing 21 changed files with 204 additions and 697 deletions.
14 changes: 7 additions & 7 deletions content/8.plugins/connect.asn.md → content/8.plugins/asn.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: connect.asn - get AS number of remote IP address plugin for Haraka
description: Haraka connect.asn plugin - get AS number of remote
navigation.title: connect.asn
title: asn - get AS number of remote IP address plugin for Haraka
description: Haraka asn plugin - get AS number of remote
navigation.title: asn
---

# connect.asn plugin
# asn plugin

* Use DNS queries to look up the ASN of the remote IP.
* Inserts a result object with the ASN of the remote host.
Expand All @@ -21,17 +21,17 @@ If your mail server is very busy:

## Usage

The AS number can be accessed by plugins that run after `connect.asn` like so:
The AS number can be accessed by plugins that run after `asn` like so:

var asn = connection.results.get('connect.asn');
var asn = connection.results.get('asn');
if (asn && asn.asn) {
connection.loginfo(plugin, "hey look, it's ASN: " + asn.asn);
}


## Configuration

The following settings can be set in config/connect.asn.ini.
The following settings can be set in config/asn.ini.

* providers: comma separated list of DNS zones that provide IP to ASN lookups

Expand Down
69 changes: 0 additions & 69 deletions content/8.plugins/connect.rdns_access.md

This file was deleted.

152 changes: 152 additions & 0 deletions content/8.plugins/dkim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
---
title: dkim - DKIM plugin for Haraka
description: Haraka DKIM plugin
navigation.title: dkim
---

# haraka-plugin-dkim

## INSTALL

```sh
cd /path/to/local/haraka
npm install haraka-plugin-dkim
echo "dkim" >> config/plugins
service haraka restart
```

### Configuration

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

```sh
cp node_modules/haraka-plugin-dkim/config/dkim.ini config/dkim.ini
$EDITOR config/dkim.ini
```

## SIGNING

This plugin implements the [DKIM Core specification](dkimcore.org).

### Getting Started

Generate a DKIM selector and keys for your domain:

```sh
cd /path/to/haraka/config/dkim
./dkim_key_gen.sh example.org
```

Within the config/dkim/${domain} directory will be 4 files:

```sh
ls config/dkim/example.org/
dns private public selector
```

The selector file contains the DNS label where the DKIM public key is published. The `private` and `public` files contain the DKIM keys.

The `dns` file contains a formatted record of the public key suitable for copy/pasting into your domains zone file. It also has suggestions for DKIM, SPF, and DMARC policy records.

The DKIM DNS record will look like this:

may2013._domainkey TXT "v=DKIM1;p=[public key stripped of whitespace];"

The values in the address have the following meaning:

hash: h=[ sha1 | sha256 ]
test; t=[ s | s:y ]
granularity: g=[ ]
notes: n=[ ]
services: s=[email]
keytypes: [ rsa ]

## Key size

The default key size created by `dkim_key_gen.sh` is 2048. That is considered secure as of mid-2024.

# What to sign

The DKIM signing key for messages from example.org _should_ be signed with
a DKIM key for example.org. Failing to do so will result in messages not
having an _aligned_ DKIM signature. For DMARC enabled domains, this will
likely result in deliverability problems.

For correct alignment, Haraka signs each message with that domains DKIM key.
For an alternative, see the legacy Single Domain Configuration below.

# Configuration

DKIM signing is configured in the sign section of `dkim.ini`.

```ini
[sign]
enabled = [ 1 | true | yes ], default=false
headers = list, of; headers (REQUIRED)

; for single domain configuration
selector = name
domain = name
```

- headers: the list of headers that should be signed, separated by commas, colons or semi-colons. Signing prevents tampering with the specified headers. The 'From' header is required by the RFC and will be added if missing.

## Single Domain Configuration

To sign all messages with a single DKIM key, you must set the selector and domain in dkim.ini. You must also save your DKIM private key in the file `dkim.private.key` in the Haraka config directory.

- selector - Set this to the selector name published in DNS under the \_domainkey sub-domain of the domain referenced below.
- domain - Set this to the domain name that will be used to sign messages which don't match a per-domain DKIM key. The DNS TXT entry for:

<selector>.\_domainkey.<domain>

Test that your DKIM key is published properly with a DNS request like this:

```sh
drill TXT $SELECTOR._domainkey.$DOMAIN
dig TXT $SELECTOR._domainkey.$DOMAIN +short
```

### Example DNS query

```sh
export SELECTOR=mar2013
export DOMAIN=simerson.net
$ dig TXT $SELECTOR._domainkey.$DOMAIN +short
"v=DKIM1;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoyUzGOTSOmakY8BcxXgi0mN/nFegLBPs7aaGQUtjHfa8yUrt9T2j6GSXgdjLuG3R43WjePQv3RHzc+bwwOkdw0XDOXiztn5mhrlaflbVr5PMSTrv64/cpFQKLtgQx8Vgqp7Dh3jw13rLomRTqJFgMrMHdhIibZEa69gtuAfDqoeXo6QDSGk5JuBAeRHEH27FriHulg5ob" "4F4lmh7fMFVsDGkQEF6jaIVYqvRjDyyQed3R3aTJX3fpb3QrtRqvfn/LAf+3kzW58AjsERpsNCSTD2RquxbnyoR/1wdGKb8cUlD/EXvqtvpVnOzHeSeMEqex3kQI8HOGsEehWZlKd+GqwIDAQAB"
```

# DKIM VERIFY

Verify DKIM signatures as defined by RFC 6376 and add an Authentication-Results header as appropriate.

## Configuration

```ini
[verify]
; allowed_time_skew = (How far can we stretch on time matching, in secs. Useful when clock is skewed.)
; sigerror_log_level =
```

## Testing

This plugin provides a command-line test tool that can be used to
debug DKIM issues or to check results.

```
# dkimverify < message
identity="@gmail.com" domain="gmail.com" result=pass
```

You can add `--debug` to the option arguments to see a full trace of the processing.

## Notes

This plugin and underlying library do not currently support DKIM body length limits (l=).

<!-- leave these buried at the bottom of the document -->

[ci-img]: https://github.com/haraka/haraka-plugin-dkim/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/haraka/haraka-plugin-dkim/actions/workflows/ci.yml
[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-dkim/badges/gpa.svg
[clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-dkim
106 changes: 0 additions & 106 deletions content/8.plugins/dkim_sign.md

This file was deleted.

Loading

0 comments on commit 4c0196a

Please sign in to comment.