Setup
Configuration
Environment variables required to run the MX API service.
Server
| Var | Description | Default |
|---|---|---|
BIND_HOST | Bind host for Fastify | 127.0.0.1 |
PORT | HTTP port | 3000 |
MX_API_KEYS | API keys for /v2 routes | none |
Postgres
| Var | Description | Default |
|---|---|---|
PGHOST | Postgres host | none |
PGUSER | Postgres user | none |
PGPASSWORD | Postgres password | none |
PGDATABASE | Postgres database | none |
PGPORT | Postgres port | 5432 |
Domain and DNS settings
| Var | Description | Default |
|---|---|---|
MX_HOST | MX target inserted in DNS records | none |
MX_PRIORITY_INT | MX priority | 10 |
MX_A_RECORD_VALUE | Optional A record for mx host | empty |
DKIM_SELECTOR | DKIM selector | default |
IMAP and sync
| Var | Description | Default |
|---|---|---|
IMAP_HOST | IMAP host for sync | 127.0.0.1 |
IMAP_PORT | IMAP port | 993 |
IMAP_SECURE | IMAP TLS on/off | true |
IMAP_MASTER_USER | Master login user | none |
IMAP_MASTER_PASS | Master login password | none |
MX_SYNC_BATCH | Sync batch size | 200 |
MX_SYNC_MAX_UIDS | Sync max UIDs per run | 2000 |
JWT verification
| Var | Description | Default |
|---|---|---|
JWT_JWKS_URL | JWKS URL for RS256/ES256 tokens | none |
JWT_HS256_SECRET | Shared secret for HS256 tokens | none |
JWT_ISSUER | Expected issuer | none |
JWT_AUDIENCE | Expected audience | none |
Webhooks
| Var | Description | Default |
|---|---|---|
DOVECOT_PUSH_HMAC_SECRET | HMAC secret for /hooks/dovecot | none |