huan / docker-simple-mail-forwarder

Simplest and Smallest Email Forward Service based on Docker.
https://hub.docker.com/r/zixia/simple-mail-forwarder/
Apache License 2.0
544 stars 88 forks source link

generate certificate for mail.domain #81

Open DamianoP opened 3 years ago

DamianoP commented 3 years ago

Hi, I have configured a system with multiple docker containers and everything is working fine. Now I'm trying to generate the certificate for a docker container that runs simple-mail-forwarder (I'm using jrcs/letsencrypt-nginx-proxy-companion).

version: '3'
services:
  mailserver:
    image: zixia/simple-mail-forwarder
    container_name: mailserver
    environment:
      - SMF_CONFIG=@domain.org:myemail
      - SMF_DOMAIN=mail.domain.org
      - LETSENCRYPT_HOST=mail.domain.org
      - LETSENCRYPT_EMAIL=myprivateemailaddress
    ports:
      - "25:25"
    restart: always

The system cannot generate the certificate for this container

CA marked some of the authorizations as invalid, which likely means it could not access http://example.com/.well-known/acme-challenge/X. 
Did you set correct path in -d example.com:path or --default_root? 
Are all your domains accessible from the internet? Please check your domains' DNS entries, your host's network/firewall setup and your webserver config. If a domain's DNS entry has both A and AAAA fields set up, some CAs such as Let's Encrypt will perform the challenge validation over IPv6. 
If your DNS provider does not answer correctly to CAA records request, Let's Encrypt won't issue a certificate for your domain (see https://letsencrypt.org/docs/caa/). Failing authorizations: https://acme-v02.api.letsencrypt.org/acme/authz-v3/7728213527
Challenge validation has failed, see error log.

I only need to certificate "mail.domain.org". I already have the cert for "domain.org" and "www.domain.org" in another container.