diff options
author | Malfurious <m@lfurio.us> | 2024-06-19 03:01:09 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2024-07-09 15:50:39 -0400 |
commit | 08b83d5142f093a60ea2dfaeb9014a5831a1480b (patch) | |
tree | 85c9c55d6e7e27f6a3df03c5779549289608ce9e /Dockerfile | |
parent | 335b9f49532ce012b6da7dc404aff1dee55bfa21 (diff) | |
download | mailnode-08b83d5142f093a60ea2dfaeb9014a5831a1480b.tar.gz mailnode-08b83d5142f093a60ea2dfaeb9014a5831a1480b.zip |
opendkim: Generate keys / TXT record
Keys are generated using the config from the previous commit and stored
in the dkim data volume. The key length is set to 1024 bits for
compatibility with nameservers. See this quote from the opendkim
readme:
BIND servers have a 256 byte limit on serving TXT records, so a 1024
bit RSA key is recommended if using BIND as your primary DNS server.
Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -46,6 +46,18 @@ RUN apt update \ sudo \ && apt clean +# Generate OpenDKIM keypair +# Do this here so we can print the pubkey/dns record to logs during build +# process. After initial run, a volume should preserve the keys for later +# runs. +RUN mkdir -p /opendkim \ + && chown opendkim:opendkim /opendkim \ + && opendkim-genkey \ + --bits=1024 \ + --directory=/opendkim \ + --selector=default \ + && cat /opendkim/default.txt + # Install files COPY dovecot /etc/dovecot/ COPY opendkim /etc/ |