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

  1. Require evidence for each destination being routed: persistent destination-specific failure, repeated retries, or an explicit business routing requirement.
  2. Inspect the effective Postfix configuration and its persistent source before proposing edits. In containerized/control-panel stacks, identify generated vs durable configuration.
  3. Inspect existing transport_maps, relayhost, SASL, TLS and sender-dependent routing so the change composes with current behavior.
  4. Design a destination transport map where only explicitly listed domains use the relay. Leave the default transport unchanged.
  5. 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.
  6. Rebuild/validate map databases as required by the active Postfix map type and verify effective configuration before reload/restart.
  7. Send controlled tests to a routed destination and a direct-delivery control destination.
  8. Confirm from Postfix logs that the intended relay handled the routed message and that the control remained direct.
  9. Treat relay SMTP 250 as successful handoff to the relay, not proof of final recipient delivery. Verify downstream delivery separately when possible.
  10. 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.

Installs
5
First Seen
Aug 31, 2026