One secured SMTP path, optional login, sender and reply address, failing health
build / test (pull_request) Successful in 17s
build / build (pull_request) Successful in 18s

The message endpoint used implicit TLS and the PDF endpoint STARTTLS on
the same port, so one of them always failed. Both now share one
connection path with an explicit SMTP_RELAY_SECURITY, log in only with
credentials, and take SMTP_FROM and SMTP_REPLY_TO. /health answers 503
when the SMTP server refuses, so the container turns unhealthy instead
of looking fine. The old tests never ran; eight new ones do, in CI too.
This commit is contained in:
libretech committed 2026-10-15 10:41:47 +02:00
1 parent 22e642e5bb
commit c8ff4ad01e
6 files changed
+251 -187

No files matched your search

+12
View File
@@ -18,6 +18,18 @@ pulls `git.librete.ch/libreshop/mail:<pin>` instead of building locally.
docker build -t libreshop/mail:dev .
```
## Settings
| variable | meaning |
|---|---|
| `SMTP_RELAY_HOST`, `SMTP_RELAY_PORT` | the SMTP server |
| `SMTP_RELAY_SECURITY` | `ssl` (port 465), `starttls` (587 or 25) or `none` (a relay on a private network); default by port |
| `SMTP_RELAY_USERNAME`, `SMTP_RELAY_PASSWORD` | login, used only when both are set |
| `SMTP_FROM` | sender, e.g. `MUELLERPRINTS <shop@example.org>`; default `SMTP_RELAY_USERNAME` |
| `SMTP_REPLY_TO` | optional reply address |
`GET /health` answers 503 when the SMTP server does not accept the connection.
## Adapter contract
See `docker-entrypoint.sh` and `Dockerfile` for the runtime surface.