postfix-selective-relay
Installation
SKILL.md
Postfix Selective Relay
Objective
Keep direct SMTP delivery as the default while routing a narrowly defined set of recipient destinations through an alternate authenticated transport.
Workflow
- Require evidence for each destination being routed: persistent destination-specific failure, repeated retries, or an explicit business routing requirement.
- Inspect the effective Postfix configuration and its persistent source before proposing edits. In containerized/control-panel stacks, identify generated vs durable configuration.
- Inspect existing
transport_maps,relayhost, SASL, TLS and sender-dependent routing so the change composes with current behavior. - Design a destination transport map where only explicitly listed domains use the relay. Leave the default transport unchanged.
- Configure relay authentication using the provider's current documented submission host/port and secret mechanism. Never put credentials in Git, shell examples, logs or skill assets.
- Rebuild/validate map databases as required by the active Postfix map type and verify effective configuration before reload/restart.
- Send controlled tests to a routed destination and a direct-delivery control destination.
- Confirm from Postfix logs that the intended relay handled the routed message and that the control remained direct.
- Treat relay SMTP
250as successful handoff to the relay, not proof of final recipient delivery. Verify downstream delivery separately when possible. - Monitor direct vs relay outcomes and expand the destination map only when evidence supports it.
Destination routing vs fallback
Prefer deterministic destination-based routing for known failures.