stalwartlabs / mail-server

Secure & Modern All-in-One Mail Server (IMAP, JMAP, POP3, SMTP)
https://stalw.art
3.55k stars 135 forks source link

[bug]: Default Credentials Invalid on first load. #440

Closed Leopere closed 1 month ago

Leopere commented 1 month ago

What happened?

Setup Stalwart behind a reverse proxy (traefik) and attempted to log in using the console given admin credentials to no avail nothing obvious being output at all no console output acknowledging the login attempt and just an invalid credentials notification.

How can we reproduce the problem?

No idea you'd have to fully rebuild my setup that would be pretty complicated but for the most part I'm running this in defaults so theres that...

networks:
  traefik:
    external: true
  default:
    driver: overlay

services:
  stalwart-mail:
    image: git.nixc.us/nixius/stalwart:production
    volumes:
      - /mnt/tank/persist/example.com/stalwart/production/data:/opt/stalwart-mail
    ports:
      - target: 25
        published: 25
        protocol: tcp
        mode: host
      - target: 587
        published: 587
        protocol: tcp
        mode: host
      - target: 465
        published: 465
        protocol: tcp
        mode: host
      - target: 143
        published: 143
        protocol: tcp
        mode: host
      - target: 993
        published: 993
        protocol: tcp
        mode: host
      - target: 4190
        published: 4190
        protocol: tcp
        mode: host
    networks:
      - traefik
      - default
    deploy:
      placement:
        constraints:
          - node.hostname == ingress.example.com
      labels:
        homepage.group: apps
        homepage.name: stalwart
        homepage.href: https://stalwart.example.com/
        homepage.description: stalwart
        traefik.enable: "true"
        traefik.http.routers.production_stalwart-mail.rule: "Host(`stalwart.example.com`)"
        traefik.http.routers.production_stalwart-mail.entrypoints: "websecure"
        traefik.http.routers.production_stalwart-mail.tls: "true"
        traefik.http.routers.production_stalwart-mail.tls.certresolver: "letsencryptresolver"
        traefik.http.services.production_stalwart-mail.loadbalancer.server.port: "8080"
        traefik.docker.network: "traefik"
        traefik.http.routers.production_stalwart-mail.middlewares: 'authelia_authelia@docker'
      update_config:
        order: stop-first
        failure_action: rollback
        delay: 30s
        parallelism: 1
      restart_policy:
        condition: on-failure

Version

v0.7.x

What database are you using?

RocksDB

What blob storage are you using?

RocksDB

Where is your directory located?

Internal

What operating system are you using?

Docker

Relevant log output

Nothing of any significance currently. I'm looking for the next steps.  I'm not even seeing any errors in the browser inspector.

Code of Conduct

mdecimus commented 1 month ago

Closing as this is a configuration issue. I recommend to first try Stalwart without any reverse proxies and once you are able to login to then enable Traefik. If the problem persists set the logging level to trace and paste the logs here.

Leopere commented 1 month ago

I didn't try not using Traefik but I did however decide to read more documentation and found that there are some beautifully suggested traefik labels and those worked great. Just seemed odd that credentials were failing because of routing labels in Traefik all is well <3 thank you for a very much-needed addition to the internet.

pomazanbohdan commented 1 month ago

I didn't try not using Traefik but I did however decide to read more documentation and found that there are some beautifully suggested traefik labels and those worked great. Just seemed odd that credentials were failing because of routing labels in Traefik all is well <3 thank you for a very much-needed addition to the internet.

Please write a list of labels that you added additionally in order for it to work successfully