The task. A connected platform hands over mail via SMTP and cannot be modified to add headers — yet its messages must go out from their own sending address, not the node’s default one.
What it is made of:
The parts have different scopes. All three act through the <source> block, and a source has exactly one rule list: if a source serves several platforms, their rules live in one ordered list.
How they interact. Three paths to one goal, and the choice depends on what is stable about the platform. The return address is usually the most stable and costs nothing. The connecting address is reliable only if it is not shared. A dedicated submission endpoint is the most reliable, but costs an address and a listener per platform. All three rank below what the platform says itself: should it start setting X-Virtual-MTA where process-x-virtual-mta is allowed, the scheme will silently stop working.
How to choose the method:
| Method | Stable if | Cost |
|---|---|---|
| by return address | the platform’s return domain is constant | nothing |
| by submission endpoint | the platform has its own submission address or port | an address and a listener per platform |
| by connecting address | the platform connects from an address it shares with no one | nothing, but fragile on someone else’s infrastructure |
<pattern-list platforms> mail-from /@bounce\.platform-a\.com$/ virtual-mta=vmta-a mail-from /@bounce\.platform-b\.com$/ virtual-mta=vmta-b </pattern-list> <source 0/0> pattern-list platforms </source>
pmta show queues '*/vmta-a'