Skip to content

[BUG] Cannot find a valid DOMAIN for '/etc/letsencrypt/live/<DOMAIN>/', tried: '', 'subdomain.domain.tld', 'domain.tld' #3133

@alexanderadam

Description

@alexanderadam

Miscellaneous first checks

  • I checked that all ports are open and not blocked by my ISP / hosting provider.
  • I know that SSL errors are likely the result of a wrong setup on the user side and not caused by DMS itself. I'm confident my setup is correct.

Affected Component(s)

DMS

What happened and when does this occur?

I'm trying to start DMS on unprivileged Podman but once I activate LetsEncrypt the server kills itself and I see this in the log:

[  ERROR  ]  Cannot find a valid DOMAIN for '/etc/letsencrypt/live/<DOMAIN>/', tried: '', 'subdomain.domain.tld', 'domain.tld'
[  ERROR  ]  _find_letsencrypt_domain | LETSENCRYPT_DOMAIN appears to be misconfigured, please verify.
[  ERROR  ]  Shutting down
[  ERROR  ]  _find_letsencrypt_key | LETSENCRYPT_DOMAIN appears to be misconfigured, please verify.
[  ERROR  ]  Shutting down
[  ERROR  ]  No difference after call to 'sed' in 'sedfile' (sed -i -r s|^(smtpd_tls_chain_files =).*|\1 /etc/letsencrypt/live//.pem /etc/letsencrypt/live//fullchain.pem| /etc/postfix/main.cf)
[  ERROR  ]  No difference after call to 'sed' in 'sedfile' (sed -i -r -e s|^(ssl_key =).*|\1 </etc/letsencrypt/live//.pem| -e s|^(ssl_cert =).*|\1 </etc/letsencrypt/live//fullchain.pem| /etc/dovecot/conf.d/10-ssl.conf)

I learned through issue #2405 that I shouldn't set LETSENCRYPT_DOMAIN (I just set it because of the error message).
The container can access the letsencryption configuration and I can also see that the directory and certs in /etc/letsencrypt/live/subdomain.domain.tld exist.

What did you expect to happen?

It should start without errors or give at least a useful error message on misconfigurations

How do we replicate the issue?

I just tried to start it

DMS version

edge

What operating system is DMS running on?

Linux

Which operating system version?

Ubuntu 22.04

What instruction set architecture is DMS running on?

AMD64 / x86_64

What container orchestration tool are you using?

Podman (not officially supported)

docker-compose.yml

-

Relevant log output

-

Other relevant information

The env in the container looks like this:

ACCOUNT_PROVISIONER=FILE
DMS_DEBUG=1
DOCKER_HOST=unix:///var/run/user/1001/podman/podman.sock
ENABLE_AMAVIS=1
ENABLE_CLAMAV=0
ENABLE_DNSBL=1
ENABLE_FAIL2BAN=1
ENABLE_OPENDKIM=1
ENABLE_POSTGREY=1
ENABLE_RSPAMD=0
ENABLE_SPAMASSASSIN=1
ENABLE_SPAMASSASSIN_KAM=1
ENABLE_UPDATE_CHECK=1
FETCHMAIL_POLL=300
HOME=/root
HOSTNAME=apps
LDAP_BIND_DN=
LDAP_BIND_PW=
LDAP_QUERY_FILTER_ALIAS=(&(objectClass=inetOrgPerson)(mailAlias=%s))
LDAP_QUERY_FILTER_DOMAIN=(|(mail=*@%s)(mailAlias=*@%s)(mailGroupMember=*@%s))
LDAP_QUERY_FILTER_GROUP=(&(objectClass=inetOrgPerson)(mailGroupMember=%s))
LDAP_QUERY_FILTER_SENDERS=(&(objectClass=inetOrgPerson)(|(mail=%s)(mailAlias=%s)(mailGroupMember=%s)))
LDAP_QUERY_FILTER_USER=(&(objectClass=inetOrgPerson)(mail=%s))
LDAP_SEARCH_BASE=
LDAP_SERVER_HOST=
LETSENCRYPT_mail_EMAIL=[email protected]
LETSENCRYPT_mail_TEST=True
LETSENCRYPT_TEST=True
LOG_LEVEL=info
MOVE_SPAM_TO_JUNK=1
NETWORK_INTERFACE=tap0
ONE_DIR=1
OVERRIDE_HOSTNAME=subdomain.domain.tld
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PODMAN_ROOTLESS=true
POSTGREY_AUTO_WHITELIST_CLIENTS=5
POSTGREY_DELAY=300
POSTGREY_MAX_AGE=35
POSTGREY_TEXT=Delayed by Postgrey
POSTMASTER_ADDRESS=[email protected]
SASLAUTHD_MECHANISMS=pam
SASLAUTHD_MECH_OPTIONS=
SPAMASSASSIN_SPAM_TO_INBOX=1
SPOOF_PROTECTION=1
SSL_TYPE=letsencrypt
SUPERVISOR_LOGLEVEL=info
TERM=xterm
TLS_LEVEL=modern
VIRTUAL_HOST=subdomain.domain.tld

What level of experience do you have with Docker and mail servers?

  • I am inexperienced with docker
  • I am rather experienced with docker
  • I am inexperienced with mail servers
  • I am rather experienced with mail servers
  • I am uncomfortable with the CLI
  • I am rather comfortable with the CLI

Code of conduct

Improvements to this form?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions