Bouncing domain

Hello KumoMTA team,

I’m trying to understand the minimal changes needed in my configuration for bouncing domains. Here’s my use case:
I have tenants, and each tenant can have multiple domains.
I need to add a bouncing domain for each tenant domain.
I’m using HTTP injection.

My questions are:
Do I need to explicitly specify the bouncing domain on the HTTP injection side, ie API payload or is it handled automatically?
On the configuration side, is it sufficient to add the bouncing domain (e.g., [“bounce.mydomain.com”]) in the listener_domains config and set log_oob = true?
Any insights on these points would be appreciated.

Sorry for the dumb questions.

What do you mean by a bouncing domain? One that incoming DSN messages will be accepted for and processed? If so then yes, that’s log_oob=true. You don’t configure that in the API call, your return path is where to send DSNs, but that does not have to be configured in the sending MTA, you may be using a separate MTA for that.

You can use one machine for sending, receiving FBL, receiving DSN, or separate ones, that is up to you. Only the one receiving those things needs to be configred for them.

Yes sorry I mean dsn messages, thank you!!

Ok, sorry I have one more follow up question:
[“testbouncer.com”]
relay_from_authz = [‘jobs’]

[“bounce.testbouncer.com”]
log_oob = true

So I have this in my listener_domains.toml

I can’t find in documentation anything about how should I setup this domain: bounce.erlangjobs.com.
I have A record obviously, and looks like I have to add MX record - correct? What should I put into that MX record?
Something like that?
name record type: priority: value: TTL
@ MX 10 mykumomtainstance.com 45000

and with that config, all bounced webhooks for testbouncer.com will be sent to my bounce.testbouncer.com?

Again, sorry for all these dumb questions. Thanks.

Bounced webhooks?

log_oob is about out of band bounces AKA Delivery Status Notifications (DSNs). Messages sent to the return path address to tell you that a message that was accepted wasn’t delivered, when that failure occurs after the initial accept. There’s no webhooks involved.

So what specifically is your desired outcome?

Sorry, not webhooks, wrong word - I mean idea is to notify domain owner about delivery failures. And I’m also trying to understand, how these dsn messages should be handled on their end, after (if I understand correctly) my mta sends DSN notification to that bounce domain

What kind of operation are you doing? Typically you would not be sending DSNs to a user, you would be receiving them from a mailbox provider.

So my usecase is:
I have a tenant with domain and I’m expecting from this tenant to have bounce domain to notify them about failures.
Basically tenants are sending emails using my MTAs injection API.
I never deal with DSN before, and I’m trying to understand the full flow, how it should work, starting from the configuration and how my tenants should handle that on their end. Hopefully that helps! Thanks for your help btw!

How is your tenant supposed to know about other events? A delivery, a tempfail, etc?

I have logic around that, I’m storing webhooks etc basically they have all the stats about sends, deliverables, bounces (just counts without any details), is the DSN something different?

The DSN is a notification email of a bounce, a permanent failure. There’s probably no reason for you to send them to your customer as you are already sending them bounce webhooks. You need to receive and process DSNs coming from mailbox providers to you, which is what log_oob = true is for.

I think @dapper-yeti wants domain owners to be notified of delivery failures via Return-Path?

Yes! Just reading about it, looks like what I need !

Ahh… for my case, I’m using the HTTP API to send email. Return-Path is set via the envelope_sender parameter. I think it’s the same with SMTP, please check out the docs for more details.

Basically, you just need to point the envelope_sender to the domain’s admin

In my setup, I included the recipient’s e-mail address for easy debugging

ie, Return-Path: bounces+marat_at_example_dot_com@domainadmin.example.org