Over-engineered play stack for infinidim.net — Stalwart wired into the shared Postgres + Redis + Garage S3 over the tailnet, with no WAN presence. Public mail ports are fronted by a separate caddy-l4 layer-4 proxy (caddy/) that can run on any tailnet host tagged tag:reverse-proxy — decoupled from the mailbox. - docker-compose.yml: ts-stalwart sidecar + stalwart, backends via MagicDNS - config/config.toml: PG (data/fts) + Redis (lookup) + S3 (blob) strawman - caddy/: xcaddy build with caddy-l4, JSON layer-4 mail proxy, own compose - acl-snippet.hujson: tag:stalwart owner + backend/edge grants - .env.example + gitignored .env (pulled from shared infra) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
53 lines
1.6 KiB
JSON
53 lines
1.6 KiB
JSON
{
|
|
"//": "Layer-4 mail edge for tailwart. Pipes raw TCP mail ports to the",
|
|
"//2": "Stalwart sidecar over the tailnet, preserving client IP via PROXY",
|
|
"//3": "protocol v2. One server per port (upstream port differs per listener).",
|
|
"//4": "Stalwart terminates TLS itself — this is pure pass-through.",
|
|
"apps": {
|
|
"layer4": {
|
|
"servers": {
|
|
"smtp": {
|
|
"listen": [":25"],
|
|
"routes": [{ "handle": [{
|
|
"handler": "proxy",
|
|
"proxy_protocol": "v2",
|
|
"upstreams": [{ "dial": ["stalwart.tail7b1641.ts.net:25"] }]
|
|
}]}]
|
|
},
|
|
"submissions": {
|
|
"listen": [":465"],
|
|
"routes": [{ "handle": [{
|
|
"handler": "proxy",
|
|
"proxy_protocol": "v2",
|
|
"upstreams": [{ "dial": ["stalwart.tail7b1641.ts.net:465"] }]
|
|
}]}]
|
|
},
|
|
"submission": {
|
|
"listen": [":587"],
|
|
"routes": [{ "handle": [{
|
|
"handler": "proxy",
|
|
"proxy_protocol": "v2",
|
|
"upstreams": [{ "dial": ["stalwart.tail7b1641.ts.net:587"] }]
|
|
}]}]
|
|
},
|
|
"imap": {
|
|
"listen": [":143"],
|
|
"routes": [{ "handle": [{
|
|
"handler": "proxy",
|
|
"proxy_protocol": "v2",
|
|
"upstreams": [{ "dial": ["stalwart.tail7b1641.ts.net:143"] }]
|
|
}]}]
|
|
},
|
|
"imaptls": {
|
|
"listen": [":993"],
|
|
"routes": [{ "handle": [{
|
|
"handler": "proxy",
|
|
"proxy_protocol": "v2",
|
|
"upstreams": [{ "dial": ["stalwart.tail7b1641.ts.net:993"] }]
|
|
}]}]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|