You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to run smtp4dev behind a Traefik reverse proxy. While smtp4dev works nicely on its own, when reverse-proxying the requests, I am met with an HTTP 500 (Internal Server Error).
You can use this Docker Compose file to reproduce:
http://localhost:81 — This will work (directly accessing the webserver in smtp4dev, without a reverse proxy)
http://localhost:80 — This will not work (accessing the webserver via the Traefik reverse proxy)
To check that Traefik is set up correctly, try replacing rnwood/smtp4dev with httpd to run a basic Apache server, which will respond under http://localhost:80.
Does smtp4dev choke on some of the HTTP headers that Traefik sends? Sadly, I am not seeing much debug output in smtp4dev either, but I can of course test things when necessary.
Thanks in advance :)
The text was updated successfully, but these errors were encountered:
TuringTux
changed the title
smtp4dev in Docker yields "Internal Server Error" when behind Traefik
Always receiving "Internal Server Error" with naive Traefik configuration
Jan 18, 2025
✅ I figured it out. The problem is that Traefik tries to route the HTTP requests to port 25 (the SMTP server). This can be fixed by manually telling Traefik where to route the HTTP requests to, e.g., like this:
I need to run smtp4dev behind a Traefik reverse proxy. While smtp4dev works nicely on its own, when reverse-proxying the requests, I am met with an HTTP 500 (Internal Server Error).
You can use this Docker Compose file to reproduce:
After starting this with
try accessing the following URLs:
To check that Traefik is set up correctly, try replacing
rnwood/smtp4dev
withhttpd
to run a basic Apache server, which will respond under http://localhost:80.Does smtp4dev choke on some of the HTTP headers that Traefik sends? Sadly, I am not seeing much debug output in smtp4dev either, but I can of course test things when necessary.
Thanks in advance :)
The text was updated successfully, but these errors were encountered: