1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00
Files
go-chasquid-smtp/internal/queue/queue.pb.go
Alberto Bertogli 55b03c8cf0 queue: Use a local envelope-from when forwarding
If there's an alias to forward email to a non-local domain, using the original
From is problematic, as we may not be an authorized sender for it.

Some MTAs (like Exim) will do it anyway, others (like gmail) will construct a
special address based on the original address.

This patch implements the latter approach, which is safer and allows the
receiver to properly enforce SPF.

We construct a (hopefully) reasonable From based on the local user, and
embedding the original From (but transformed for IDNA, as the receiver may not
support SMTPUTF8).
2016-10-10 00:51:05 +01:00

168 lines
7.1 KiB
Go

// Code generated by protoc-gen-go.
// source: queue.proto
// DO NOT EDIT!
/*
Package queue is a generated protocol buffer package.
It is generated from these files:
queue.proto
It has these top-level messages:
Message
Recipient
*/
package queue
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import google_protobuf "github.com/golang/protobuf/ptypes/timestamp"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type Recipient_Type int32
const (
Recipient_EMAIL Recipient_Type = 0
Recipient_PIPE Recipient_Type = 1
)
var Recipient_Type_name = map[int32]string{
0: "EMAIL",
1: "PIPE",
}
var Recipient_Type_value = map[string]int32{
"EMAIL": 0,
"PIPE": 1,
}
func (x Recipient_Type) String() string {
return proto.EnumName(Recipient_Type_name, int32(x))
}
func (Recipient_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} }
type Recipient_Status int32
const (
Recipient_PENDING Recipient_Status = 0
Recipient_SENT Recipient_Status = 1
Recipient_FAILED Recipient_Status = 2
)
var Recipient_Status_name = map[int32]string{
0: "PENDING",
1: "SENT",
2: "FAILED",
}
var Recipient_Status_value = map[string]int32{
"PENDING": 0,
"SENT": 1,
"FAILED": 2,
}
func (x Recipient_Status) String() string {
return proto.EnumName(Recipient_Status_name, int32(x))
}
func (Recipient_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 1} }
type Message struct {
// Message ID. Uniquely identifies this message, it is used for
// auditing and troubleshooting.
ID string `protobuf:"bytes,1,opt,name=ID,json=iD" json:"ID,omitempty"`
// The envelope for this message.
From string `protobuf:"bytes,2,opt,name=from" json:"from,omitempty"`
To []string `protobuf:"bytes,3,rep,name=To,json=to" json:"To,omitempty"`
Rcpt []*Recipient `protobuf:"bytes,4,rep,name=rcpt" json:"rcpt,omitempty"`
Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
// Creation timestamp.
CreatedAtTs *google_protobuf.Timestamp `protobuf:"bytes,6,opt,name=created_at_ts,json=createdAtTs" json:"created_at_ts,omitempty"`
// Hostname of the server receiving this message.
Hostname string `protobuf:"bytes,7,opt,name=hostname" json:"hostname,omitempty"`
}
func (m *Message) Reset() { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage() {}
func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *Message) GetRcpt() []*Recipient {
if m != nil {
return m.Rcpt
}
return nil
}
func (m *Message) GetCreatedAtTs() *google_protobuf.Timestamp {
if m != nil {
return m.CreatedAtTs
}
return nil
}
type Recipient struct {
// Address to send the message to.
// This is the final one, after expanding aliases.
Address string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
Type Recipient_Type `protobuf:"varint,2,opt,name=type,enum=queue.Recipient_Type" json:"type,omitempty"`
Status Recipient_Status `protobuf:"varint,3,opt,name=status,enum=queue.Recipient_Status" json:"status,omitempty"`
LastFailureMessage string `protobuf:"bytes,4,opt,name=last_failure_message,json=lastFailureMessage" json:"last_failure_message,omitempty"`
// Address that this recipient was originally intended to.
// This is before expanding aliases and only used in very particular
// cases.
OriginalAddress string `protobuf:"bytes,5,opt,name=original_address,json=originalAddress" json:"original_address,omitempty"`
}
func (m *Recipient) Reset() { *m = Recipient{} }
func (m *Recipient) String() string { return proto.CompactTextString(m) }
func (*Recipient) ProtoMessage() {}
func (*Recipient) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func init() {
proto.RegisterType((*Message)(nil), "queue.Message")
proto.RegisterType((*Recipient)(nil), "queue.Recipient")
proto.RegisterEnum("queue.Recipient_Type", Recipient_Type_name, Recipient_Type_value)
proto.RegisterEnum("queue.Recipient_Status", Recipient_Status_name, Recipient_Status_value)
}
func init() { proto.RegisterFile("queue.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 403 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x64, 0x90, 0x51, 0x8b, 0x9c, 0x30,
0x14, 0x85, 0xab, 0xeb, 0x38, 0x3b, 0xd7, 0x76, 0x2b, 0xa1, 0xa5, 0x61, 0xfa, 0xb2, 0x48, 0x1f,
0xba, 0x14, 0xb4, 0x4c, 0x1f, 0x0b, 0x85, 0x01, 0xdd, 0x22, 0x74, 0x87, 0xc1, 0xf5, 0x5d, 0x32,
0x9a, 0x71, 0x03, 0x6a, 0xac, 0x89, 0x0f, 0xfd, 0x47, 0xfd, 0x3f, 0xfd, 0x43, 0x4d, 0xa2, 0x4e,
0xa1, 0xfb, 0x96, 0x7b, 0xcf, 0xc9, 0xe5, 0x3b, 0x07, 0xbc, 0x9f, 0x23, 0x1d, 0x69, 0xd8, 0x0f,
0x5c, 0x72, 0xb4, 0x32, 0xc3, 0xf6, 0x6b, 0xcd, 0xe4, 0xd3, 0x78, 0x0a, 0x4b, 0xde, 0x46, 0x35,
0x6f, 0x48, 0x57, 0x47, 0x46, 0x3f, 0x8d, 0xe7, 0xa8, 0x97, 0xbf, 0x7a, 0x2a, 0x22, 0xc9, 0x5a,
0x2a, 0x24, 0x69, 0xfb, 0x7f, 0xaf, 0xe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