Internal Server Error with Mailcatcher malformed HTTP status code

Hi, I'm facing this error when I try to proxy a mailcatcher service:

time="2020-03-06T10:44:36Z" level=debug msg="'500 Internal Server Error' caused by: malformed HTTP status code \"EventMachine\""

I can't figure out how to solve this error as it's working well when I'm using another web proxy like nginx-proxy-companion.

Mailcatcher DC file:

version: '3'
services:
  mailcatcher:
    image: tophfr/mailcatcher
    container_name: mailcatcher
    restart: always
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=webproxy"
      - "traefik.http.routers.mailcatcher.rule=Host(`mailcatcher.my-website.fr`)"
      - "traefik.http.routers.mailcatcher.entrypoints=https"
      - "traefik.http.routers.mailcatcher.tls.certresolver=letsencrypt"
    networks:
      - frontend
      - backend
networks:
  frontend:
    external:
      name: webproxy
  backend:
    driver: bridge

Traefik DC file:

version: '3.7'
services:
  traefik:
    image: traefik:v2.1
    container_name: traefik
    restart: always
    ports:
      - 80:80
      - 443:443
      - 8080:8080
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./conf/traefik/traefik.toml:/traefik.toml
      - ./conf/traefik/acme.json:/acme.json
      - ./log/traefik.log:/traefik.log
    labels:
      - "traefik.http.routers.api.rule=Host(`traefik.my-website.fr`)"
      - "traefik.http.routers.api.service=api@internal"
      - "traefik.http.routers.api.entrypoints=http"
      - "traefik.http.routers.api.middlewares=auth"
      - "traefik.http.middlewares.auth.basicauth.users=xxxxxx"

    networks:
      - webproxy
  
networks:
  webproxy:
    name: webproxy
    driver: bridge

Traefik config file:

[global]
  sendAnonymousUsage = false

[log]
  filePath = "traefik.log"
  level = "DEBUG"
  format = "common"

[accessLog]

[entryPoints]
  [entryPoints.http]
  address = ":80"
  [entryPoints.https]
  address = ":443"

[api]

[providers]
  [providers.docker]
    endpoint = "unix:///var/run/docker.sock"
    watch = true
    exposedByDefault = true
    swarmMode = false

[certificatesResolvers.letsencrypt.acme]
  email = "postmaster@my-website.fr"
  storage = "acme.json"
  [certificatesResolvers.letsencrypt.acme.httpChallenge]
    entryPoint = "http"

So the solution is quite easy. Mailcatcher exposes 2 ports - 80 and 25. And if you have a look on your mailcatcher service in traefik dashboard you can find that traefik selected port 25 for this server.
So the solution is to add additional port label:
https://docs.traefik.io/v2.2/routing/providers/docker/#port

In my case DC for mailcatcher looks like

  mailcatcher:
    image: jeanberu/mailcatcher
    container_name: mailcatcher
    restart: always
    environment:
      SMTP_PORT: 25
      HTTP_PORT: 80
    labels:
      - "traefik.http.routers.mailcatcher.rule=Host(`mailcatcher.docker.localhost`)"
      - "traefik.http.services.mailcatcher.loadbalancer.server.port=80"
      - "traefik.http.routers.mailcatcher.middlewares=service-users"
    networks:
      - default