Hello - we submit all of our messages into a kumo instance via inject API and wanted to add some meta fields to the kumoref. After changing the init.lua to add the meta to the ref, our sent messages now include 2 kumoref headers, one that includes the fields plus the default, one that only is the default. I can pass more information privately but here’s a snippet of our init.lua which adds the trace fields in:
kumo.on('http_message_generated', function(msg)
local failed = msg:check_fix_conformance(
-- check for and reject messages with these issues:
'NON_CANONICAL_LINE_ENDINGS',
-- fix messages with these issues:
'LINE_TOO_LONG|NAME_ENDS_WITH_SPACE|NEEDS_TRANSFER_ENCODING|NON_CANONICAL_LINE_ENDINGS|MISSING_DATE_HEADER|MISSING_MESSAGE_ID_HEADER|MISSING_MIME_VERSION'
)
if failed then
kumo.reject(552, string.format('5.6.0 %s', failed))
end
-- Call the queue helper to set up the queue for the message.
--msg:set_meta('queue', 'relaydomain')
msg:import_scheduling_header 'X-Schedule'
local dbm_batchid = msg:get_first_named_header_value 'X-DBM-BatchID'
if dbm_batchid then
msg:set_meta('dbm-batchid', dbm_batchid)
end
local dbm_emailid = msg:get_first_named_header_value 'X-DBM-EmailId'
if dbm_emailid then
msg:set_meta('dbm-emailid', dbm_emailid)
end
kumo.apply_supplemental_trace_header(msg, {
include_meta_names = {
'dbm-batchid',
'dbm-emailid'
}
})
queue_helper:apply(msg)
-- SIGNING MUST COME LAST OR YOU COULD BREAK YOUR DKIM SIGNATURES
dkim_signer(msg)
end)