mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
queue: Send delivery status notifications on failures
When we permanently failed to deliver to one or more recipients, send delivery status notifications back to the sender. To do this, we need to extend a couple of internal structures, to keep track of the original destinations (so we can include them in the message, for reference), and the hostname we're identifying ourselves as (this is arguable but we're going with it for now, may change later).
This commit is contained in:
@@ -680,7 +680,7 @@ func (c *Conn) DATA(params string, tr *trace.Trace) (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.mailFrom, c.rcptTo, c.data)
|
||||
msgID, err := c.queue.Put(c.hostname, c.mailFrom, c.rcptTo, c.data)
|
||||
if err != nil {
|
||||
tr.LazyPrintf(" error queueing: %v", err)
|
||||
tr.SetError()
|
||||
|
||||
Reference in New Issue
Block a user