docker-mailserver: Error: Please fix your configuration. Exiting...

Hi guys,

I just pulled and updated image tvial/docker-mailserver:v2 and started seeing this in the logs:

mail_1               | 
mail_1               | #
mail_1               | #
mail_1               | # docker-mailserver
mail_1               | #
mail_1               | #
mail_1               | 
mail_1               | Initializing setup
mail_1               | Checking configuration
mail_1               | Configuring mail server
mail_1               | Error: Please fix your configuration. Exiting...
myapp_mail_1 exited with code 1

I’m using docker-compose.yml. Nothing has been changed in the config since the last docker-compose up around a month ago; all was working perfectly in the time-being.

Given that the image was updated just three hours ago, can it be some newly introduced bug or a backwards-compatibility issue? Others may struggle with the same thing as me I guess.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 25 (21 by maintainers)

Commits related to this issue

Most upvoted comments

So, sorry for the confusion.

With this docker-compose.yml file

version: '2'

services:
  mail:
    image: tvial/docker-mailserver
    # build: .
    hostname: mail
    domainname: xxx.xx
    ports:
      - "25:25"
      - "143:143"
      - "587:587"
      - "993:993"
      - "4190:4190"
    volumes:
      - /var/vmail/:/var/mail/
      - ./config/:/tmp/docker-mailserver/
      - ./letsencrypt/:/etc/letsencrypt/:ro
      - /etc/localtime:/etc/localtime:ro
    environment:
     - ENABLE_FAIL2BAN=1
     - ENABLE_MANAGESIEVE=1
     - SSL_TYPE=letsencrypt
    # - DMS_DEBUG=1
    cap_add:
     - NET_ADMIN

I get:

Recreating mailserver_mail_1
Attaching to mailserver_mail_1
mail_1  |
mail_1  | #
mail_1  | #
mail_1  | # docker-mailserver
mail_1  | #
mail_1  | #
mail_1  |
mail_1  | Initializing setup
mail_1  | Checking configuration
mail_1  | Configuring mail server
mail_1  |   * Spamassassin is disabled. You can enable it with 'ENABLE_SPAMASSASSIN=1'
mail_1  |   * Clamav is disabled. You can enable it with 'ENABLE_CLAMAV=1'
mail_1  | Error: Please fix your configuration. Exiting...
mailserver_mail_1 exited with code 1

When enabling DMS_DEBUG=1 I get:

Recreating mailserver_mail_1
Attaching to mailserver_mail_1
mail_1  |
mail_1  | #
mail_1  | #
mail_1  | # ENV
mail_1  | #
mail_1  | #
mail_1  |
mail_1  | HOSTNAME=mail
mail_1  | ENABLE_MANAGESIEVE=1
mail_1  | DMS_DEBUG=1
mail_1  | PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
mail_1  | ENABLE_FAIL2BAN=1
mail_1  | PWD=/
mail_1  | SHLVL=1
mail_1  | HOME=/root
mail_1  | SSL_TYPE=letsencrypt
mail_1  | _=/usr/bin/printenv
mail_1  |
mail_1  | #
mail_1  | #
mail_1  | # docker-mailserver
mail_1  | #
mail_1  | #
mail_1  |
mail_1  | Initializing setup
mail_1  |   Registering check,setup,fix,misc and start-daemons functions
mail_1  |   * _check_environment_variables() registered
mail_1  |   * _check_hostname() registered
mail_1  |   * _setup_default_vars() registered
mail_1  |   * _setup_dovecot() registered
mail_1  |   * _setup_dovecot_local_user() registered
mail_1  |   * _setup_dkim() registered
mail_1  |   * _setup_ssl() registered
mail_1  |   * _setup_docker_permit() registered
mail_1  |   * _setup_mailname() registered
mail_1  |   * _setup_postfix_override_configuration() registered
mail_1  |   * _setup_postfix_sasl_password() registered
mail_1  |   * _setup_security_stack() registered
mail_1  |   * _setup_postfix_aliases() registered
mail_1  |   * _setup_postfix_vhost() registered
mail_1  |   * _fix_var_mail_permissions() registered
mail_1  |   * _misc_save_states() registered
mail_1  |   * _start_daemons_cron() registered
mail_1  |   * _start_daemons_rsyslog() registered
mail_1  |   * _start_daemons_dovecot() registered
mail_1  |   * _start_daemons_opendkim() registered
mail_1  |   * _start_daemons_opendmarc() registered
mail_1  |   * _start_daemons_postfix() registered
mail_1  |   * _start_daemons_fail2ban() registered
mail_1  |   * _start_daemons_amavis() registered
mail_1  | Checking configuration
mail_1  |   Check that there are no conflicts with env variables [_check_environment_variables]
mail_1  |   Check that hostname/domainname is provided (no default docker hostname) [_check_hostname]
mail_1  |   * Hostname has been set to mail.xxx.xx
mail_1  | Configuring mail server
mail_1  |   Setting up default variables [_setup_default_vars]
mail_1  |   * Set ENABLE_LDAP=0
mail_1  |   * Set ENABLE_FETCHMAIL=0
mail_1  |   * Set ENABLE_MANAGESIEVE=1
mail_1  |   * Set DMS_DEBUG=1
mail_1  |   * Set VIRUSMAILS_DELETE_DELAY=7
mail_1  |   * Set ENABLE_POP3=0
mail_1  |   * Set ENABLE_SASLAUTHD=0
mail_1  |   * Set ENABLE_CLAMAV=0
mail_1  |   * Set SMTP_ONLY=0
mail_1  |   * Set ENABLE_FAIL2BAN=1
mail_1  |   * Set ENABLE_SPAMASSASSIN=0
mail_1  |   Setting up Dovecot
mail_1  |   * Sieve management enabled
mail_1  |   Setting up Dovecot Local User
mail_1  |   * Checking file line endings
mail_1  |   * Regenerating postfix user list
mail_1  |   * user 'everything' for domain 'xxx.xx' with password '********'
mail_1  |   * user 'support' for domain 'xxx.xx' with password '********'
mail_1  |   * user 'yyy' for domain 'xxx.xx' with password '********'
mail_1  |   Setting up DKIM
mail_1  |   * DKIM keys added for: xxx.xx
mail_1  |   * Changing permissions on /etc/opendkim
mail_1  |   Setting up SSL
mail_1  |   * Adding mail.xxx.xx SSL certificate
mail_1  |   * SSL configured with 'letsencrypt' certificates
mail_1  |   Setting up PERMIT_DOCKER Option
mail_1  |   * Adding container ip in my networks
mail_1  |   Setting up Mailname
mail_1  |   * Creating /etc/mailname
mail_1  |   Setting up Postfix Override configuration
mail_1  |   * No extra postfix settings loaded because optional '/tmp/docker-mailserver/postfix-main.cf' not provided.
mail_1  |   Setting up Postfix SASL Password
mail_1  |   * Warning: 'SASL_PASSWD' is not provided. /etc/postfix/sasl_passwd not created.
mail_1  |   Setting up Security Stack
mail_1  |   * Spamassassin is disabled. You can enable it with 'ENABLE_SPAMASSASSIN=1'
mail_1  |   * Clamav is disabled. You can enable it with 'ENABLE_CLAMAV=1'
mail_1  |   * Fail2ban enabled
mail_1  |   Setting up Postfix Aliases
mail_1  |   * Warning 'config/postfix-virtual.cf' is not provided. No mail alias/forward created.
mail_1  |   * Adding regexp alias file postfix-regexp.cf
mail_1  |   Setting up Postfix vhost
mail_1  |   Fixing /var/mail permissions
mail_1  |   * Permissions in /var/mail look OK
mail_1  | Starting Misc
mail_1  | Starting mail server
mail_1  |   Starting cron  [ OK ]
mail_1  |   Starting rsyslog  [ OK ]
mail_1  |   Starting dovecot services  [ OK ]
mail_1  |   Starting opendkim  [ OK ]
mail_1  |   Starting opendmarc  [ OK ]
mail_1  |   Starting postfix  [ OK ]
mail_1  |   Starting fail2ban  [ OK ]
mail_1  |   Starting amavis  [ OK ]
mail_1  |
mail_1  | #
mail_1  | # mail.xxx.xx is up and running
mail_1  | #

I just repulled the latest image with docker pull. docker-compose rm -v && docker-compose up doesn’t help - same output as shown above. Hope this helps in diagnosing the problem.

hi there i have a TVS-671 Qnap installed mailserver docker image and everytime run it , this error message comes up ,… i cant see this in settings on the menu , where do i go and what do i do please ?

Initializing setup
Checking configuration

  • Setting hostname/domainname is required
    Aborted

Image ready.