1
0
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:
Alberto Bertogli
2016-09-25 15:50:17 +01:00
parent 927a74aa3c
commit 1d3675a133
10 changed files with 226 additions and 65 deletions

View File

@@ -13,11 +13,15 @@ message Message {
// The envelope for this message.
string from = 2;
repeated Recipient rcpt = 3;
bytes data = 4;
repeated string To = 3;
repeated Recipient rcpt = 4;
bytes data = 5;
// Creation timestamp.
google.protobuf.Timestamp created_at_ts = 5;
google.protobuf.Timestamp created_at_ts = 6;
// Hostname of the server receiving this message.
string hostname = 7;
}
message Recipient {
@@ -35,5 +39,7 @@ message Recipient {
FAILED = 2;
}
Status status = 3;
string last_failure_message = 4;
}