Docs Get key
All server guides
Open Source Mail Servers

Route and forward mail through maddy's module pipeline

Separate local delivery, queued remote delivery, and forwarding while keeping recipient authorization and loop prevention explicit.

Reviewed

maddy’s composable pipeline can route mail to local storage, remote MX delivery, or a configured SMTP/LMTP target. Select the intended job instead of treating every received address as permission to relay.

Design a bounded forwarding rule

  1. Review the SMTP routing, local queue, and forwarding target references on the official documentation site.
  2. Match only the local domain/address intended for forwarding and map it to an approved destination.
  3. Keep authenticated submission and unauthenticated Internet receipt on the appropriate authorization paths.
  4. Define queue/retry and downstream rejection handling, then check how sender authentication and forwarding interact in your chosen topology.

Do not construct shell commands from recipient/body data or rely on subject text to identify a tenant. Avoid a destination that routes back into the same rule and creates a loop.

Exercise failure and recovery

Use controlled traffic for an allowed recipient, an unconfigured address, a temporary downstream outage, and a permanent rejection. Confirm accepted mail remains queued/recoverable according to the configured target rather than being acknowledged and lost.

If forwarding into MailKite, configure the provider’s verified receiving route independently; its later signed webhook is a new delivery boundary. A direct maddy hook does not automatically gain that signature or retention contract. Keep queue evidence and application deduplication separate so an SMTP retry cannot trigger duplicate business actions.