Hi again,
I was currently testing OOB, but appear to have trouble understanding why they’re not logged to the webhook.
For example:
User A sets cname for bounces.user.com to bounces.esp.net, this has an MX pointing the the incoming Kumo SMTP listener:
listen = "0.0.0.0:2510", -- proxied to 25
hostname = "bounces.esp.net", ... ommitted tls and banner property```
Message arrives, showing these logs with `kcli trace-smtp-server`:
```[10.2.11.0:25876->10.2.1.55:2510] 1s -> ------33D00BEF02924490820158550AD524A1
[10.2.11.0:25876->10.2.1.55:2510] 1s -> Content-Type: message/delivery-status
[10.2.11.0:25876->10.2.1.55:2510] 1s -> Content-Description: Delivery report
[10.2.11.0:25876->10.2.1.55:2510] 1s ->
[10.2.11.0:25876->10.2.1.55:2510] 1s -> Reporting-MTA: smtp; service.socketlabs.com
[10.2.11.0:25876->10.2.1.55:2510] 1s -> Original-Recipient: rfc822; bounce-test@service.socketlabs.com
[10.2.11.0:25876->10.2.1.55:2510] 1s -> Action: failed
[10.2.11.0:25876->10.2.1.55:2510] 1s -> Status: 5.1.1
[10.2.11.0:25876->10.2.1.55:2510] 1s -> Diagnostic-Code: SMTP; 550 No such recipient
[10.2.11.0:25876->10.2.1.55:2510] 1s ->
[10.2.11.0:25876->10.2.1.55:2510] 1s -> ------33D00BEF02924490820158550AD524A1--
[10.2.11.0:25876->10.2.1.55:2510] 1s ->
[10.2.11.0:25876->10.2.1.55:2510] 1s -> .
[10.2.11.0:25876->10.2.1.55:2510] 1s === smtp_server_message_received: Ok
[10.2.11.0:25876->10.2.1.55:2510] 1s === get_listener_domain domain=bounces.esp.net: Ok: Object {"log_arf": String("LogThenRelay"), "log_oob": String("LogThenRelay"), "relay_from": Array [], "relay_to": Bool(false), "ttl": String("1m")}
[10.2.11.0:25876->10.2.1.55:2510] 1s === Message from=<3e8.10.feedback=bounces.user.com@tracking.socketlabs.com> to=<feedback@bounces.esp.net> id=370482d0539711f0a6d0c2c86979c17c
[10.2.11.0:25876->10.2.1.55:2510] 1s === Message queue=default@bounces.esp.net relay=false log_arf="LogThenRelay" log_oob="LogThenRelay" was_arf_or_oob=Some(false) will_enqueue=Some(false)
[10.2.11.0:25876->10.2.1.55:2510] 1s === Message meta: ehlo_domain="s1-be0f.socketlabs.email-od.com"
[10.2.11.0:25876->10.2.1.55:2510] 1s === Message meta: hostname="bounces.esp.net"
[10.2.11.0:25876->10.2.1.55:2510] 1s === Message meta: received_from="10.2.11.0:25876"
[10.2.11.0:25876->10.2.1.55:2510] 1s === Message meta: received_via="10.2.1.55:2510"
[10.2.11.0:25876->10.2.1.55:2510] 1s === Message meta: reception_protocol="ESMTP"
[10.2.11.0:25876->10.2.1.55:2510] 1s === Message meta: tenant="default"
[10.2.11.0:25876->10.2.1.55:2510] 1s <- 550 5.7.1 relaying not permitted
[10.2.11.0:25876->10.2.1.55:2510] 1s -> QUIT
[10.2.11.0:25876->10.2.1.55:2510] 1s <- 221 So long, and thanks for all the fish!
[10.2.11.0:25876->10.2.1.55:2510] 1s === Closed```
When using the socketlabs.com bounce test address, it shows log_oob "LogThenRelay" but doesn't call the webhook and it returns `relaying not permitted`.
Since the return path can be anything, we have this to rewrite the recipient:
```kumo.on('get_listener_domain', function(domain, listener, conn_meta)
local is_bounce_listener = string.match(listener, ":2510$") ~= nil
if is_bounce_listener then
return kumo.make_listener_domain {
log_oob = true,
log_arf = true,
}
end
end)```