How to set the smtp_host

Hello, As we move over from pmta, we are trying to replicate our vmta setup. We have some pmta/vmtas that send direct to ISPs, and we have some that send out through smtp services (like aws ses). I can see in the make_egress_path that we can set an smtp username, password, port, and enable tls… but not seeing how to set the smtp host (basically we want all messages from a particular source to go out through aws if the source matches, regardless of the destination domain). We’ve looked around the various config areas and through the community site, having trouble finding the best way to do that. Thank you!

To add to that, we’re looking right now at the routing_domain in the queue configuration… not quite sure if that is the best practice or how we can use that to segment the traffic by source domain since it doesn’t seem to have access to that aspect of the configuration in the queue section?

Is this actually source domain, or is it more about the tenant? You may want to look at assigning this traffic to a specific tenant, then mapping that tenant to an egress_pool, then configure the egress_source to have the credentials.

The source domain forms the basis for our (current) logic: e.g. all traffic from @foo.com would be routed directly to the destination, whereas all traffic from *@bar.com would route through aws ses. I guess that was chosen originally bc that was what made the most sense given the pmta options. Based on my understandings of tenants, we are really a single-tenant entity as a business (though we could certainly set up multiple tenants if that is the best way). That said, at which point and in what way would we specify the ses hostname? egress_source doesn’t seem to have an smtp_host property?

See Custom Destination Routing - KumoMTA Docs for the options you have.

The right approach depends heavily on what those source domains represent.

In your case if they truly depend on the originating domain then you’d likely want to use the per-message example at Custom Destination Routing - KumoMTA Docs and do a lookup against source domain.