diff options
| -rw-r--r-- | README.md | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -57,3 +57,26 @@ export default { Note: `http2lmtp` itself never retries. The client is responsible for it. + +## Environment + +All configuration is read from the environment at startup. Missing +required variables cause the process to exit before binding. + +| Variable | Required | Default | Description | +|---|---|---|---| +| `INGEST_TOKEN` | yes | — | Shared secret. Requests must carry `Authorization: Bearer <token>`. Compared in constant time. | +| `LMTP_SOCK` | yes | — | Path to the LMTP unix socket, e.g. `/var/run/dovecot/lmtp`. The process must have write access to it. | +| `LISTEN_ADDR` | no | `127.0.0.1:8080` | Address and port for the HTTP listener. | +| `LMTP_RCPT` | no | — | Deliver every message to this single recipient instead of the address in `x-envelope-to`. The original recipient is preserved as an `X-Original-To:` header. Unset: the envelope recipient is passed through as-is. | +| `RUST_LOG` | no | — | Log filter, e.g. `http2lmtp=info`. Standard `tracing-subscriber` syntax. | + +### Example + +```sh +INGEST_TOKEN=$(openssl rand -base64 32) +LMTP_SOCK=/var/run/dovecot/lmtp +LISTEN_ADDR=127.0.0.1:1234 +RUST_LOG=http2lmtp=info +``` |
