mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
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).
46 lines
733 B
Protocol Buffer
46 lines
733 B
Protocol Buffer
|
|
syntax = "proto3";
|
|
|
|
package queue;
|
|
|
|
import "github.com/golang/protobuf/ptypes/timestamp/timestamp.proto";
|
|
|
|
|
|
message Message {
|
|
// Message ID. Uniquely identifies this message, it is used for
|
|
// auditing and troubleshooting.
|
|
string ID = 1;
|
|
|
|
// The envelope for this message.
|
|
string from = 2;
|
|
repeated string To = 3;
|
|
repeated Recipient rcpt = 4;
|
|
bytes data = 5;
|
|
|
|
// Creation timestamp.
|
|
google.protobuf.Timestamp created_at_ts = 6;
|
|
|
|
// Hostname of the server receiving this message.
|
|
string hostname = 7;
|
|
}
|
|
|
|
message Recipient {
|
|
string address = 1;
|
|
|
|
enum Type {
|
|
EMAIL = 0;
|
|
PIPE = 1;
|
|
}
|
|
Type type = 2;
|
|
|
|
enum Status {
|
|
PENDING = 0;
|
|
SENT = 1;
|
|
FAILED = 2;
|
|
}
|
|
Status status = 3;
|
|
|
|
string last_failure_message = 4;
|
|
}
|
|
|