mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-09 17:55:57 +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:
@@ -510,7 +510,7 @@ func (c *Conn) DATA(params string) (code int, msg string) {
|
||||
|
||||
// There are no partial failures here: we put it in the queue, and then if
|
||||
// individual deliveries fail, we report via email.
|
||||
msgID, err := c.queue.Put(c.hostname, c.mailFrom, c.rcptTo, c.data)
|
||||
msgID, err := c.queue.Put(c.mailFrom, c.rcptTo, c.data)
|
||||
if err != nil {
|
||||
return 554, fmt.Sprintf("Failed to enqueue message: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user