1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

queue: Always use the main domain for sending DSNs

Today, we pick the domain used to send the DSN from based on what we
presented to the client at EHLO time, which itself may be based on the
TLS negotiation (which is not necessarily trusted).

This is complex, not necessarily correct, and involves passing the
domain around through the queue and persisting it in the items.

So this patch simplifies that handling by always using the main domain
as specified by the configuration.
This commit is contained in:
Alberto Bertogli
2016-10-13 12:08:21 +01:00
parent b8c0ac98f4
commit fe146f00e5
8 changed files with 54 additions and 57 deletions

View File

@@ -13,12 +13,11 @@ func TestDSN(t *testing.T) {
"oh! horror!", ""},
{"newman@rcpt", Recipient_EMAIL, Recipient_FAILED,
"oh! the humanity!", ""}},
Data: []byte("data ñaca"),
Hostname: "from.org",
Data: []byte("data ñaca"),
},
}
msg, err := deliveryStatusNotification(item)
msg, err := deliveryStatusNotification("dsnDomain", item)
if err != nil {
t.Error(err)
}