Docker 邮件服务器中的 Devcot 无法启动

Docker 邮件服务器中的 Devcot 无法启动

我已经下载了容器“docker-mailserver”,并通过 Portainer 堆栈启动它。堆栈执行时,它总是卡在 dovecot 错误中。容器内部发生以下情况。我该怎么办?

[   INF   ]  Welcome to docker-mailserver 11.3.0
[   INF   ]  Initializing setup
[   INF   ]  Checking configuration
[   INF   ]  Configuring mail server
[ WARNING ]  You need at least one mail account to start Dovecot (120s left for account creation before shutdown)
[ WARNING ]  You need at least one mail account to start Dovecot (110s left for account creation before shutdown)

.... ....

我的堆栈如下:

services:
  mailserver:
    image: docker.io/mailserver/docker-mailserver:latest
    container_name: mailserver
    # Provide the FQDN of your mail server here (Your DNS MX record should point to this value)
    hostname: mail.domain.win
    ports:
      - "28:25"
      - "590:587"
      - "996:993"
    volumes:
    - /srv/dev-disk-by-uuid-14a35ebc-6358-492c-af84-4e920f0c55bc/Docker/volumes/ajmail/mail-data/:/var/mail/
    - /srv/dev-disk-by-uuid-14a35ebc-6358-492c-af84-4e920f0c55bc/Docker/volumes/ajmail/mail-state/:/var/mail-state/
    - /srv/dev-disk-by-uuid-14a35ebc-6358-492c-af84-4e920f0c55bc/Docker/volumes/ajmail/mail-logs/:/var/log/mail/
    - /srv/dev-disk-by-uuid-14a35ebc-6358-492c-af84-4e920f0c55bc/Docker/volumes/ajmail/config/:/tmp/docker-mailserver/
    - /etc/localtime/:/etc/localtime:ro
    environment:
      - ENABLE_SPAMASSASSIN=1
      - SPAMASSASSIN_SPAM_TO_INBOX=1
      - ENABLE_CLAMAV=1
      - ENABLE_FAIL2BAN=1
      - ENABLE_POSTGREY=1
    restart: always
  #  stop_grace_period: 1m
    cap_add:
      - NET_ADMIN
  #  healthcheck:
  #    test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
  #    timeout: 3s
  #    retries: 0

答案1

在容器启动期间,您必须通过 SSH 快速登录容器并输入

"setup email add [email protected]"

(不是所有文档都告诉您的 ./setup.sh!)然后容器启动将继续。

相关内容