ok got it
but @faithful-ostrich I have assign elastics ips to ec2 instance
have a look below
inet 10.4.1.71/24 brd 10.4.1.255 scope global dynamic eth0
inet 10.4.1.72/24 brd 10.4.1.255 scope global secondary eth0
and so on
In that case again, please provide the information listed in the how to get help page.
kumo.on('get_egress_source', function(source_name)
if source_name == 'ip-2' then
-- Make a source that will emit from 10.0.0.1
return kumo.make_egress_source {
name = 'ip-2',
source_address = '10.4.1.72',
}
end
error 'you need to do something for other source names'
end)```
Can you just provide your full init.lua pls? It helps to see it all together.
ok sure
local kumo = require 'kumo'
kumo.on('init', function()
kumo.start_esmtp_listener {
listen = '0.0.0.0:587',
hostname = 'Mailhub',
}
kumo.define_spool {
name = 'data',
path = '/var/spool/kumomta/data',
}
kumo.define_spool {
name = 'meta',
path = '/var/spool/kumomta/meta',
}
kumo.configure_local_logs {
log_dir = '/var/log/kumomta',
}
kumo.set_diagnostic_log_filter 'kumod=debug'
end)
kumo.on('get_egress_source', function(source_name)
if source_name == 'ip-2' then
return kumo.make_egress_source {
name = 'ip-2',
source_address = '10.4.1.72',
}
end
error 'you need to do something for other source names'
end)
kumo.on('smtp_server_message_received', function(msg)
local signer = kumo.dkim.rsa_sha256_signer {
domain = msg:from_header().domain,
selector = 'acls01',
headers = { 'From', 'To', 'Subject' },
key = '/opt/kumomta/etc/dkim/acl.pinchappmails.com/acls01.key',
}
msg:dkim_sign(signer)
local domain = msg:recipient().domain
if (domain == "gmail.com")
then
local aclmobile_net_signer = kumo.dkim.rsa_sha256_signer {
domain = 'aclmobile.net',
selector = '5nXKKHgBnyGAcLwvMLZIq',
headers = {'Content-Type', 'Message-Id', 'Subject', 'Date', 'Mime-Version', 'To', 'From'},
key = '/opt/kumomta/etc/dkim/aclmobile.net/5nXKKHgBnyGAcLwvMLZIq.key',
}
msg:dkim_sign(aclmobile_net_signer)
msg:dkim_sign(signer)
end
end)```
My previous feedback still applies: Discord
You may want to review the overall configuration chapter.
ok let me try that
hey guys I have tried but still a failurw
And I hope by now you know what I’ll ask you for next.
What “failure” are you seeing?
What is the full config you are using now?
What message did you inject to test? (And how? )
“It’s broken” is not a problem we can fix without more context
local SOURCE_TO_IP = {
['ip-1'] = '10.4.1.74',
['ip-2'] = '10.4.1.75',
['ip-3'] = '10.4.1.73',
}
function setup_pools()
return {
['BestReputation'] = kumo.make_egress_pool {
name = 'BestReputation',
entries = {
{ name = 'ip-1' },
},
},
['MediumReputation'] = kumo.make_egress_pool {
name = 'MediumReputation',
entries = {
{ name = 'ip-2', weight = 2 },
-- we're warming up ip-3, so use it less frequently than ip-2
{ name = 'ip-3', weight = 1 },
},
},
}
end
local POOLS = setup_pools()
kumo.on('get_egress_pool', function(pool_name)
return POOLS[pool_name]
end)
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
return kumo.make_egress_source {
name = 'ip-1',
source_address = '10.4.1.74',
}
end
error 'you need to do something for other source names'
end)
this is my configuration