Files
mail/README.md
T
libretech c8ff4ad01e
build / test (pull_request) Successful in 17s
build / build (pull_request) Successful in 18s
One secured SMTP path, optional login, sender and reply address, failing health
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.
2026-10-15 10:41:47 +02:00

38 lines
1.2 KiB
Markdown

# libreshop/mail
Python microservice for transactional shop mail.
Part of the [libreshop](https://git.librete.ch/libreshop) toolkit. Image
published at `git.librete.ch/libreshop/mail` on every push to `main`
and on `v*` tags.
## Source
This repo was extracted from `mp/mail/` on 2026-04-29; mp was the
first concrete adapter consuming the toolkit. mp's `compose.yml` now
pulls `git.librete.ch/libreshop/mail:<pin>` instead of building locally.
## Build 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.
Adapters configure the component via env vars and bind-mounted volumes;
do not patch the running container or rely on internal paths.