DEV Community

Volanea
Volanea

Posted on

Routing inbound mail when one domain serves many products

Once a product has more than one team, support@example.com becomes a routing problem. The default answer — a shared inbox with labels — breaks the moment two people or two agents process the same message.

Route on the address, not the subject

The local part is the only field a sender controls reliably. support+enterprise@ and support+billing@ look like one mailbox to most systems, which means routing on the plus tag is fragile across providers. Dedicated addresses per queue survive normalisation because they are ordinary local parts.

Assign ownership before delivery

Routing should decide who owns the message before it lands, not after somebody opens it. If ownership is a label applied later, two consumers can both pick it up. If ownership is decided at delivery, the message exists exactly once in exactly one queue.

Keep the raw message

Routing rules change. If you store only the extracted body, re-routing history later is impossible and you cannot answer why a message went to the wrong team. Keep the original and derive the routing decision as a separate record.

The failure to design for

A loop. An autoresponder replying to an autoresponder produces a mail loop that fills a mailbox in minutes. Set a maximum hop count from the Received headers and drop anything that exceeds it, rather than trusting senders to behave.

Volanea creates a distinct inbox per queue with server-side ownership, so a message is never in two places at once.

Top comments (0)