docker-mailserver: generate-dkim-config fails silently

As of 2.1 it’s impossible to generate DKIM config, using this dockerfile:

version: '2'

services:
  mail:
    image: tvial/docker-mailserver:2.1
    hostname: mail
    domainname: domain.com
    container_name: mail
    ports:
    - "25:25"
    - "143:143"
    - "587:587"
    - "993:993"
    volumes:
    - maildata:/var/mail
    - mailstate:/var/mail-state
    - ./config/:/tmp/docker-mailserver/
    environment:
    - ENABLE_SPAMASSASSIN=1
    - ENABLE_CLAMAV=1
    - ENABLE_FAIL2BAN=1
    - ONE_DIR=1
    - DMS_DEBUG=0
    cap_add:
    - NET_ADMIN

volumes:
  maildata:
    driver: local
  mailstate:
    driver: local

nothing happens when running:

docker run --rm \
>   -v "$(pwd)/config":/tmp/docker-mailserver \
>   -ti tvial/docker-mailserver:latest generate-dkim-config

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Hi, you can add a dummy address to config/postfix-accounts.cf, generate keys with generate-dkim-config and remove the address from config/postfix-accounts.cf.

Making a fix for this issue is still on my todo list, i will do it when i have a bit of time.