OOB Processing

I’m encountering an issue with processing Out-of-Band (OOB) messages in KumoMTA. The system keeps relaying them internally, even though I haven’t set relay_to = true in my listener domain.toml configuration.

Additionally, while the messages are correctly logged as OOB, but the header field in the JSON logs comes empty, despite having specified custom headers in the log configuration within init.lua.

Could you please help me resolve this? I want the OOB to be logged and discarded not to be relayed.

Sample SMT server

Message queue=default-tenant@xxxx relay=true log_arf=“Ignore” log_oob=“LogThenRelay” was_arf_or_oob=Some(true) will_enqueue=Some(true)

Log config
kumo.configure_local_logs {
log_dir = ‘/var/log/kumomta’,
max_segment_duration = ‘10 seconds’,
headers = { ‘X-Customer-ID’,‘X-Campaign’,‘X-Data’},
}

listener_domain.tol

[“domain”]
log_oob = true
relay_to = false

Sample of OOB

{
“type”: “OOB”,
“id”: “65f45a7656f111f0acc30050565b6d49”,
“sender”: “xxxxx”,
“recipient”: “xxxx”,
“queue”: “default-tenant@xxx”,
“site”: “”,
“size”: 0,
“response”: {
“code”: 550,
“enhanced_code”: {
“class”: 5,
“subject”: 1,
“detail”: 1
},
“content”: “5.1.1 RESOLVER.ADR.RecipNotFound; not found”,
“command”: null
},
“peer_address”: {
“name”: “XXXX”,
“addr”: “209.145.58.146”
},
“timestamp”: 1751425524,
“created”: 1751425524,
“num_attempts”: 0,
“bounce_classification”: “InvalidRecipient”,
“egress_pool”: null,
“egress_source”: null,
“source_address”: null,
“feedback_report”: null,
“meta”: {},
“headers”: {},
“delivery_protocol”: null,
“reception_protocol”: “ESMTP”,
“nodeid”: “cb7e6242-f2e0-4054-b403-0dc818a57bb4”,
“session_id”: “d58c7dc6-bc2c-454c-ba4b-50f6f03a0560”
}

Thanks.

:backhand_index_pointing_up: Full configs, traces, logs, etc please. You are most likely treating the oob like a message and trying to relay it to yourself.

Thank you Tom,

I found the issue, it was the setting of log_oob =true in the listener_domains.tom, it seems as long as the value is log_oob =true, Kumomta will log and relay the message. I have to replaced

kumo.on(
‘get_listener_domain’,
listener_domains:setup { ‘/opt/kumomta/etc/custom/listener_domains.toml’ }
)

With

kumo.on(‘get_listener_domain’, function(domain, listener, conn_meta)
if domain == ‘mta002.senderr.com’ then
return kumo.make_listener_domain {
log_arf = ‘’,
log_oob = ‘LogThenDrop’,
}
end
end)

Which now wortking fine, hovwere I could figure, how to to that isng listener_domains.tom, is there any way I can do that using the .toml file insted of hard code it on init.lua?

Thanks

Where did you find this? I think this is also the solution to the same issue that I experience but can’t find this value in the documentation

ah nvm - found it here kumomta/docs/reference/kumo/make_listener_domain/log_arf.md at 72c38fe3624358c2038790e0b3c009b30807b540 · KumoCorp/kumomta · GitHub

Its a quick fix but require hard coding it init.lua which I am trying to avoid.

if I add the option LogThenDrop in the listener_domains.toml, I get an error and cant start the MTA

  1. Load the policy helper in init.lua

local listener_domains = require ‘policy-extras.listener_domains’

  1. Load the listener_domains.toml file.

kumo.on(
‘get_listener_domain’,
listener_domains:setup { ‘/opt/kumomta/etc/listener_domains.toml’ }
)

  1. Add the domain
    [“bounce.example.com”]
    log_oob = ‘LogThenDrop’

Thank you Syed, that work perfectly.