Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poste.IO y traefik 2.11 #263

Open
YnievesDotNet opened this issue Apr 2, 2024 · 0 comments
Open

Poste.IO y traefik 2.11 #263

YnievesDotNet opened this issue Apr 2, 2024 · 0 comments

Comments

@YnievesDotNet
Copy link

Disculpen por volver a abrir el hilo, pero aun no resuelvo el tema

lo estoy haciendo de esta manera para que el posteio maneje el desafio http-01, ya que actualmente los puertos seguros del pop y del imap me dicen que estan mal los certificados, que son autofirmados.

version: '3.9'
 
services:
 mailserver:
    image: analogic/poste.io
    container_name: mailserver
    restart: unless-stopped
    hostname: ${HOSTNAME}
    labels:
      - traefik.enable=true
      - traefik.http.routers.poste-io-acme.entrypoints=web
      - traefik.http.routers.poste-io-acme.rule=${TRAEFIK_RULES} && PathPrefix(`/.well-known/acme-challenge/`)
      - traefik.http.routers.poste-io-acme.service=poste-io-acme-service
      - traefik.http.routers.poste-io-acme.priority=50
      - traefik.http.services.poste-io-acme-service.loadbalancer.server.port=80
      - traefik.http.routers.poste-io.entrypoints=websecure
      - traefik.http.routers.poste-io.rule=(${TRAEFIK_RULES})
      - traefik.http.routers.poste-io.service=poste-io-service
      - traefik.http.services.poste-io-service.loadbalancer.server.port=80
      - traefik.docker.network=proxy
    environment:
      - HTTPS=OFF
      - TZ=America/Havana
      - DISABLE_CLAMAV=TRUE
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./mail-data:/data
    expose:
      - 80
    ports:
      - "25:25"
      - "110:110"
      - "143:143"
      - "587:587"
      - "993:993"
      - "995:995"
      - "4190:4190"
    networks:
      - mailserver
      - proxy
 
networks:
  mailserver:
    name: mailserver
  proxy:
    name: proxy

hasta ahi todo bien, pero cuando intento pasar el reto, desde la configuracion del poste.io recibo este mensaje desde el log de traefik
time="2024-04-02T12:14:55-04:00" level=error msg="Cannot retrieve the ACME challenge for mail.domain.net (token \"ra6HwDDchYE7FjXdbM-qLz6Ft_rveu8klF1XXsWd9w8\")" providerName=acme

y en el panel del Poste, este

[2024-04-02T12:14:50.116507-04:00] LEScript.INFO: ACME Client: analogic-lescript/0.3.0
[2024-04-02T12:14:50.116735-04:00] LEScript.INFO: Getting list of URLs for API
[2024-04-02T12:14:50.527119-04:00] LEScript.INFO: Requesting new nonce for client communication
[2024-04-02T12:14:50.950950-04:00] LEScript.INFO: Account already registered. Continuing.
[2024-04-02T12:14:50.951118-04:00] LEScript.INFO: Sending registration to letsencrypt server
[2024-04-02T12:14:50.967244-04:00] LEScript.INFO: Sending signed request to https://acme-v02.api.letsencrypt.org/acme/new-acct
[2024-04-02T12:14:51.410699-04:00] LEScript.INFO: Account: https://acme-v02.api.letsencrypt.org/acme/acct/1598271317
[2024-04-02T12:14:51.410821-04:00] LEScript.INFO: Starting certificate generation process for domains
[2024-04-02T12:14:51.411074-04:00] LEScript.INFO: Requesting challenge for mail.domain.net
[2024-04-02T12:14:51.427871-04:00] LEScript.INFO: Sending signed request to https://acme-v02.api.letsencrypt.org/acme/new-order
[2024-04-02T12:14:52.204013-04:00] LEScript.INFO: Sending signed request to https://acme-v02.api.letsencrypt.org/acme/authz-v3/333722105157
[2024-04-02T12:14:52.717429-04:00] LEScript.INFO: Got challenge token for mail.domain.net
[2024-04-02T12:14:52.717891-04:00] LEScript.INFO: Token for mail.domain.net saved at /opt/www//.well-known/acme-challenge/ra6HwDDchYE7FjXdbM-qLz6Ft_rveu8klF1XXsWd9w8 and should be available at http://mail.domain.net/.well-known/acme-challenge/ra6HwDDchYE7FjXdbM-qLz6Ft_rveu8klF1XXsWd9w8
[2024-04-02T12:14:52.717936-04:00] LEScript.INFO: Sending request to challenge
[2024-04-02T12:14:52.733983-04:00] LEScript.INFO: Sending signed request to https://acme-v02.api.letsencrypt.org/acme/chall-v3/333722105157/UN1TcA
[2024-04-02T12:14:53.266161-04:00] LEScript.INFO: Verification pending, sleeping 1s
[2024-04-02T12:14:54.282822-04:00] LEScript.INFO: Sending signed request to https://acme-v02.api.letsencrypt.org/acme/chall-v3/333722105157/UN1TcA
[2024-04-02T12:14:54.723015-04:00] LEScript.INFO: Verification pending, sleeping 4s
[2024-04-02T12:14:58.739385-04:00] LEScript.INFO: Sending signed request to https://acme-v02.api.letsencrypt.org/acme/chall-v3/333722105157/UN1TcA
[2024-04-02T12:14:59.256911-04:00] LEScript.ERROR: 400 {   "type": "urn:ietf:params:acme:error:malformed",   "detail": "Unable to update challenge :: authorization must be pending",   "status": 400 }
[2024-04-02T12:14:59.257018-04:00] LEScript.ERROR: #0 /opt/admin/vendor/analogic/lescript/Lescript.php(580): Analogic\ACME\Client->curl()
[2024-04-02T12:14:59.257051-04:00] LEScript.ERROR: #1 /opt/admin/vendor/analogic/lescript/Lescript.php(448): Analogic\ACME\Client->post()
[2024-04-02T12:14:59.257075-04:00] LEScript.ERROR: #2 /opt/admin/vendor/analogic/lescript/Lescript.php(164): Analogic\ACME\Lescript->signedRequest()
[2024-04-02T12:14:59.257097-04:00] LEScript.ERROR: #3 /opt/admin/src/Base/Handler/LeHandler.php(62): Analogic\ACME\Lescript->signDomains()
[2024-04-02T12:14:59.257125-04:00] LEScript.ERROR: #4 /opt/admin/src/Base/Controller/LeController.php(71): App\Base\Handler\LeHandler->renew()
[2024-04-02T12:14:59.257148-04:00] LEScript.ERROR: #5 /opt/admin/vendor/symfony/http-kernel/HttpKernel.php(163): App\Base\Controller\LeController->issueAction()
[2024-04-02T12:14:59.257174-04:00] LEScript.ERROR: #6 /opt/admin/vendor/symfony/http-kernel/HttpKernel.php(75): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
[2024-04-02T12:14:59.257309-04:00] LEScript.ERROR: #7 /opt/admin/vendor/symfony/http-kernel/Kernel.php(202): Symfony\Component\HttpKernel\HttpKernel->handle()
[2024-04-02T12:14:59.257344-04:00] LEScript.ERROR: #8 /opt/admin/public/index.php(24): Symfony\Component\HttpKernel\Kernel->handle()
[2024-04-02T12:14:59.257374-04:00] LEScript.ERROR: #9 {main}

tal parece que traefik esta asumiendo este reto, sin embargo, por el navegador accedi a
http://mail.domain.net/.well-known/acme-challenge/ra6HwDDchYE7FjXdbM-qLz6Ft_rveu8klF1XXsWd9w8 y el reto paso bien, recibi el fichero para descargarlo, con el token dentro y, no escribio nada en el log del traefik, es decir, la regla funciono con el navegador pero no con el LE, debo añadir algo mas las reglas del traefik?

Desde ya muchas gracias a todos.

Yoinier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant