Bookstack SMTP issue

Hey there,

I set up bookstack using the docker-compose.yml with traefikv2 as reverse proxy.
Everything works great, the domain points to bookstack, I can create accounts and so on.

I’ve added the mail-config to my .env file but still get the following error.

Connection could not be established with host localhost :stream_socket_client(): Unable to connect to localhost:1025 (Address not available)

My .env-file

# Mail system to use
# Can be 'smtp' or 'sendmail'
MAIL_DRIVER=smtp

# Mail sending options
MAIL_FROM=username@domain.com
MAIL_FROM_NAME=name

# SMTP mail options
MAIL_HOST=sub.domain.com
MAIL_PORT=587
MAIL_USERNAME=username@domain.com
MAIL_PASSWORD=password
MAIL_ENCRYPTION=STARTTLS

My docker-compose.yml

version: "3.7"
services:
  bookstack:
    image: linuxserver/bookstack:latest
    container_name: bookstack
    environment:
      - APP_URL=https://my-sub.domain.com
      - TZ=Europe/Berlin
      # - PUID= # = stat ./bookstack/app --format "%u"
      # - PGID= # = stat ./bookstack/app --format "%g"
      - DB_HOST=bookstack_db
      - DB_DATABASE=bookstackdb
      - DB_USERNAME=<dbuser>
      - DB_PASSWORD=<dbpassword>
    volumes:
      - ./bookstack/app:/config
    ports:
      - 6875:80
    restart: unless-stopped
    depends_on:
      - bookstack_db
    labels:
      traefik.enable: "true"
      traefik.docker.network: "proxy"
      traefik.http.routers.bookstack.entrypoints: "http"
      traefik.http.routers.bookstack.rule: "Host(`my-sub.domain.com`)"
      traefik.http.middlewares.bookstack-https-redirect.redirectscheme.scheme: "https"
      traefik.http.routers.bookstack.middlewares: "bookstack-https-redirect"
      traefik.http.routers.bookstack-secure.entrypoints: "https"
      traefik.http.routers.bookstack-secure.rule: "Host(`my-sub.domain.com`)"
      traefik.http.routers.bookstack-secure.tls: "true"
      traefik.http.routers.bookstack-secure.tls.certresolver: "http"
      traefik.http.services.bookstack.loadbalancer.server.port: "80"
    networks:
     - default
     - proxy
  bookstack_db:
    image: lscr.io/linuxserver/mariadb
    container_name: bookstack_db
    environment:
      - TZ=Europe/Berlin
      - MYSQL_ROOT_PASSWORD=<dbrootpassword>
      - MYSQL_DATABASE=bookstackdb
      - MYSQL_USER=<dbuser>
      - MYSQL_PASSWORD=<dbpassword>
    volumes:
      - ./bookstack/db:/var/lib/mysql
    restart: unless-stopped
    networks:
     - default
networks:
  default:
    name: bookstack-default
  proxy:
    external: true

My traefik.yaml

api:
  dashboard: true
entryPoints:
  http:
    address: ":80"
  https:
    address: ":443"
providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false
  file:
    filename: "./dynamic_conf.yml"
certificatesResolvers:
  http:
    acme:
      email: username@domain.com
      storage: acme.json
      httpChallenge:
        entryPoint: http