So I have a server with approx 20 IP addresses on it, but we use specific IP’s for specific campaigns. How can I specify which IP to use?
I can’t find anything in the docs about interfaces. (I assume it should be configured in init.lua)
So I have a server with approx 20 IP addresses on it, but we use specific IP’s for specific campaigns. How can I specify which IP to use?
I can’t find anything in the docs about interfaces. (I assume it should be configured in init.lua)
Hey there @kooky-vicuna, thanks for posting. Please read the “Troubleshooting” and “How to Ask for Help” buttons below. If you would like a 1:1 support session from the KumoMTA team, details are at the “Book a Support Session” button below.
Thanks! I’ll test it out
kumo.on('get_egress_source', function(source_name)
if source_name == 'ip-1' then
-- Make a source that will emit from 10.0.0.1
kumo.make_egress_source {
name = 'ip-1',
source_address = '10.0.0.1',
ehlo_domain = 'mta1.examplecorp.com',
}
end
error 'you need to do something for other source names'
end)
Is the “ehlo_domain” required? I assume it’s optional?
I’d suggest using the helper rather than Lua.
And ehlo is important.
Failing to have an ehlo with a matching PTR record will damage deliverability.
Yeah I read about that, will it error if I remove the ehlo_domain? Since I wanna test out before actually setting up an ehlo subdomain
It won’t error, it will use the server’s hostname.
Alright perfect, thanks!
@yearning-hyena Sorry for bothering you, but would this be a correct setup?
I kinda prefer using the init.lua file so I have all in 1 place
I restarted kumo and sent a test mail, it still uses the main IP of the server
I think you will find that separating config to the helpers is actually easier to manage than keeping everything in the init.lua
I have a bash setup script that’ll automatically write a certain configuration to the lua file, which kinda is easier in my use case, so I don’t have to work with separate files
Can u tell if the egress part in my screenshot is the right way?
(I tried the separate file method though, that one didn’t work since it errored)
You can also write the helper config in JSON.
And we went to a fair effort to keep people from having to learn Lua.
Hmm didn’t know u could have a config in JSON
The helper makes this very straightforward.
The entire documentation looks based on Lua though, I don’t see any JSON helper or I’m just browsing the docs wrong