feat: add Postfix/pneumatube container rig with live recipient rejection
This commit is contained in:
parent
722394a7bf
commit
a0950fab52
9 changed files with 306 additions and 2 deletions
55
docker-compose.yml
Normal file
55
docker-compose.yml
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
# Local test rig for the Postfix -> LMTP -> pneumatube wiring, matching the
|
||||
# shape of a real deployment: Postfix owns the SMTP side, pneumatube is its
|
||||
# LMTP delivery backend. This is NOT the recommended production topology —
|
||||
# a real deployment runs Postfix on the host with real TLS/DNS, not in a
|
||||
# container (see the project's Postfix wiring notes); this rig has no TLS,
|
||||
# no abuse limits, and trusts every connecting host (mynetworks=0.0.0.0/0).
|
||||
#
|
||||
# Requires PNEUMATUBE_SMOLMAIL_DOMAIN and PNEUMATUBE_SMTP_RELAY_HOST set in
|
||||
# the environment or a .env file. The gateway's own smolmail account must
|
||||
# already be registered against that server before pneumatube can run — the
|
||||
# same bootstrap as any smolmail client, using the mounted sibling checkout
|
||||
# and ./data as --key/--db:
|
||||
#
|
||||
# docker compose run --rm pneumatube \
|
||||
# uv run /smolmail/smolmail.py --key /data/gateway.key --db /data/gateway.db keygen
|
||||
# docker compose run --rm pneumatube \
|
||||
# uv run /smolmail/smolmail.py --key /data/gateway.key --db /data/gateway.db trust <host> <server-key>
|
||||
# docker compose run --rm pneumatube \
|
||||
# uv run /smolmail/smolmail.py --key /data/gateway.key --db /data/gateway.db register <user>@<host>
|
||||
|
||||
services:
|
||||
pneumatube:
|
||||
build: .
|
||||
volumes:
|
||||
- ../smolmail:/smolmail:ro
|
||||
- ./data:/data
|
||||
environment:
|
||||
PNEUMATUBE_SMOLMAIL_REPO: /smolmail
|
||||
PNEUMATUBE_SMOLMAIL_KEY: /data/gateway.key
|
||||
PNEUMATUBE_SMOLMAIL_DB: /data/gateway.db
|
||||
PNEUMATUBE_SMOLMAIL_DOMAIN: ${PNEUMATUBE_SMOLMAIL_DOMAIN:?set the smolmail server address}
|
||||
PNEUMATUBE_EMAIL_DOMAIN: ${PNEUMATUBE_EMAIL_DOMAIN:-gateway.example}
|
||||
PNEUMATUBE_LISTEN_PROTOCOL: lmtp
|
||||
PNEUMATUBE_LISTEN_HOST: 0.0.0.0
|
||||
PNEUMATUBE_LISTEN_PORT: "2424"
|
||||
PNEUMATUBE_LOOKUP_HOST: 0.0.0.0
|
||||
PNEUMATUBE_LOOKUP_PORT: "2526"
|
||||
PNEUMATUBE_SMTP_RELAY_HOST: ${PNEUMATUBE_SMTP_RELAY_HOST:?set an outbound relay host}
|
||||
PNEUMATUBE_SMTP_RELAY_PORT: ${PNEUMATUBE_SMTP_RELAY_PORT:-587}
|
||||
PNEUMATUBE_SMTP_RELAY_USER: ${PNEUMATUBE_SMTP_RELAY_USER:-}
|
||||
PNEUMATUBE_SMTP_RELAY_PASSWORD: ${PNEUMATUBE_SMTP_RELAY_PASSWORD:-}
|
||||
PNEUMATUBE_SMTP_RELAY_STARTTLS: ${PNEUMATUBE_SMTP_RELAY_STARTTLS:-1}
|
||||
PNEUMATUBE_GATEWAY_FROM_ADDRESS: ${PNEUMATUBE_GATEWAY_FROM_ADDRESS:-gateway@gateway.example}
|
||||
|
||||
postfix:
|
||||
build: ./docker/postfix
|
||||
depends_on:
|
||||
- pneumatube
|
||||
environment:
|
||||
POSTFIX_RELAY_DOMAIN: ${PNEUMATUBE_EMAIL_DOMAIN:-gateway.example}
|
||||
PNEUMATUBE_HOST: pneumatube
|
||||
PNEUMATUBE_PORT: "2424"
|
||||
PNEUMATUBE_LOOKUP_PORT: "2526"
|
||||
ports:
|
||||
- "2525:25"
|
||||
Loading…
Add table
Add a link
Reference in a new issue