Skip to content

Commit 4b1196d

Browse files
committed
Mailman: update README.md for DKIM ARC pkcs8 keys
1 parent 2c6b45b commit 4b1196d

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

contrib/mailman/README.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,32 @@ Integration with Postfix is done via transport maps, relay domains, and virtual
1717
The postfix configuration template `_server_workspace_/etc/postfix/main.cf.tmpl` must be updated to include these mappings.
1818

1919
Installation:
20-
1. It is assumend the mailserver is properly configured and has been started at least once, so the configuration files are available at `_server_workspace_`.
21-
2. Copy `mailman.yaml` and `start_mailman.sh` into the repository root.
22-
3. Edit `mailman.yaml` and follow instructions to fill in the placeholders ("TODO:").
23-
You'll need to create a `mailman@DOMAIN` user on the mailserver for this.
24-
4. Copy `Caddyfile.mailman.inc` to `_server_workspace_/etc/caddy`
25-
5. Edit `Caddyfile.mailman.inc` and follow instructions to activate the include file
26-
6. Edit `_server_workspace_/etc/postfix/main.cf.tmpl` and add the contents of `postfix.main.snippet`
27-
(see instructions in `postfix.main.snippet`).
28-
7. Copy the `mailman.cfg` config snippet to `_server_workspace_/mailman/core/var/etc/` and edit the file to fill in the blanks.
20+
1. It is assumend the mailserver is properly configured and has been started at least once, so the configuration files are available at `_server_workspace_`.
21+
2. Copy `mailman.yaml` and `start_mailman.sh` into the repository root.
22+
3. Edit `mailman.yaml` and follow instructions to fill in the placeholders ("TODO:").
23+
You'll need to create a `mailman@DOMAIN` user on the mailserver for this.
24+
4. Copy `Caddyfile.mailman.inc` to `_server_workspace_/etc/caddy`
25+
5. Edit `Caddyfile.mailman.inc` and follow instructions to activate the include file
26+
6. Edit `_server_workspace_/etc/postfix/main.cf.tmpl` and add the contents of `postfix.main.snippet`
27+
(see instructions in `postfix.main.snippet`).
28+
7. Copy the `mailman.cfg` config snippet to `_server_workspace_/mailman/core/mailman-extra.cfg` and edit the file to fill in the blanks.
29+
Copy your mail server's private DKIM signing key to where it was specifiec in ``, likely `_server_workspace_/mailman/core//var/etc/`.
30+
1. NOTE that Mailman's ARC signature subsystem requires mailserver keys to be in PKCS#1 format.
31+
Newer openssl versions produce PKCS#8 keys, leading to this error:
32+
```
33+
Traceback (most recent call last):
34+
File "/opt/mailman/lib/python3.7/site-packages/dkim/crypto.py", line 140, in parse_private_key
35+
pka = asn1_parse(ASN1_RSAPrivateKey, data)
36+
File "/opt/mailman/lib/python3.7/site-packages/dkim/asn1.py", line 85, in asn1_parse
37+
r.append(asn1_parse(t[1], data[i:i+length]))
38+
File "/opt/mailman/lib/python3.7/site-packages/dkim/asn1.py", line 92, in asn1_parse
39+
"Unexpected tag (got %02x, expecting %02x)" % (tag, t[0]))
40+
dkim.asn1.ASN1FormatError: Unexpected tag (got 30, expecting 02)
41+
```
42+
To convert a private key from one format into the other, use
43+
```
44+
openssl rsa -in pkcs8key.key -traditional -out pkcs1key.key
45+
```
2946
3047
Restart the mailserver.
3148

0 commit comments

Comments
 (0)