I was just going through our logs and noticed that we’ve had only 6 webhook calls with OOB status over the past 30 days, dug a bit deeper and found over 500 messages with the subject Mail delivery failed: returning message to sender which seem to be DSNs from exim.
Also double checked and the domains do have log_oob = true in listener_domains.toml.
Attached one of the examples below. Is this because these DSN messages don’t conform to RFC3464? dsn.eml (152 KB)
local kumo = require 'kumo'
local function new_msg(recip)
local f <close> = io.open('/home/wez/Downloads/dsn.eml')
local data = f:read('a')
return kumo.make_message(
'sender@example.com',
'recip@example.com',
data
)
end
local msg = new_msg()
print(msg:parse_rfc3464())
and run it like this, you can see that the message doesn’t parse:
$ /opt/kumomta/sbin/kumod --script --policy ./parse-bounce.lua
Error: Failed to parse policy file "./parse-bounce.lua"
Caused by:
required header reporting-mta is not present
stack traceback:
[C]: in method 'parse_rfc3464'
[string "./parse-bounce.lua"]:14: in main chunk
I haven’t yet drilled deeper to see more into this, but it doesn’t parse as a valid RFC3464, so we won’t produce a log record in that format.