Areeb
January 13, 2025, 3:10am
1
I know the current documentation help you set the tenant:
kumo.on(‘smtp_server_message_received’, function(msg)
– Assign tenant based on X-Tenant header.
local tenant = msg:get_first_named_header_value ‘X-Tenant’
if tenant then
msg:set_meta(‘tenant’, tenant)
end
end)
I want a similar method to set the source IP from my list.
[source.“ip-11”]
tom
(Tom Mairs)
January 13, 2025, 6:50am
3
You have to assign to a pool, but it can be a pool of 1 ip
tom
(Tom Mairs)
January 13, 2025, 6:51am
4
You may want to consider using the queue helper too
After a message is injected, it is placed into a Scheduled Queue based on the combination of its Campaign, Tenant, Destination and Routing Domains. If any of these attributes are not set, the queue will be based on whichever elements are present. The...
Areeb
January 13, 2025, 8:02am
6
I’ll post my config here, just in case..
Areeb
January 13, 2025, 8:02am
7
local sources = require 'policy-extras.sources'
sources:setup { '/opt/kumomta/etc/sources.toml' }
-- Configure the queue and DKIM.
kumo.on('get_queue_config', function(domain, tenant, campaign)
local zoneId = tenant
local params = {
egress_pool = "pool-" .. zoneId,
retry_interval = '5 minutes',
max_retry_interval = '1 hour',
max_age = '5 days'
}
return kumo.make_queue_config(params)
end)