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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user