Score:0

Devcot in Docker Mailserver not starting

ro flag

I have downloaded the container "docker-mailserver" and I am launching it via Portainer stack. When the stack executes, it always gets stuck with a dovecot error. The below happens inside the container. What can I do?

[   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)

.... ....

My stack is below:

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
in flag
Silly question, but have you defined at least one mail account?
Marc avatar
ro flag
I havent even gotten to that. This happens at the container launch phase.
in flag
You need to provide it at the time of the container creation, not afterwards via a Terminal
Marc avatar
ro flag
How can I provide a mail account when the environment is not even created yet? I think only after the stack has completed by launching the container I can log in via terminal and add stuff. No?
Marc avatar
ro flag
can so eone explain why my question has been voted down?
Score:1
ro flag

During container launch, you have to quickly log into the container via SSH and type

"setup email add xxx@domain.yyy"

(not ./setup.sh as all the documentation tells you!) Then the container launch will continue.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.