mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-21 15:17:01 +00:00
This patch introduces a new "domaininfo" package, which implements a database with information about domains. In particular, it tracks incoming and outgoing security levels. That information is used in incoming and outgoing SMTP to prevent downgrades.
97 lines
3.7 KiB
Go
97 lines
3.7 KiB
Go
// Code generated by protoc-gen-go.
|
|
// source: domaininfo.proto
|
|
// DO NOT EDIT!
|
|
|
|
/*
|
|
Package domaininfo is a generated protocol buffer package.
|
|
|
|
It is generated from these files:
|
|
domaininfo.proto
|
|
|
|
It has these top-level messages:
|
|
Domain
|
|
*/
|
|
package domaininfo
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
// 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 SecLevel int32
|
|
|
|
const (
|
|
// Does not do TLS.
|
|
SecLevel_PLAIN SecLevel = 0
|
|
// TLS client connection (no certificate validation).
|
|
SecLevel_TLS_CLIENT SecLevel = 1
|
|
// TLS, but with invalid certificates.
|
|
SecLevel_TLS_INSECURE SecLevel = 2
|
|
// TLS, with valid certificates.
|
|
SecLevel_TLS_SECURE SecLevel = 3
|
|
)
|
|
|
|
var SecLevel_name = map[int32]string{
|
|
0: "PLAIN",
|
|
1: "TLS_CLIENT",
|
|
2: "TLS_INSECURE",
|
|
3: "TLS_SECURE",
|
|
}
|
|
var SecLevel_value = map[string]int32{
|
|
"PLAIN": 0,
|
|
"TLS_CLIENT": 1,
|
|
"TLS_INSECURE": 2,
|
|
"TLS_SECURE": 3,
|
|
}
|
|
|
|
func (x SecLevel) String() string {
|
|
return proto.EnumName(SecLevel_name, int32(x))
|
|
}
|
|
func (SecLevel) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
type Domain struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
|
// Security level for mail coming from this domain (they send to us).
|
|
IncomingSecLevel SecLevel `protobuf:"varint,2,opt,name=incoming_sec_level,json=incomingSecLevel,enum=domaininfo.SecLevel" json:"incoming_sec_level,omitempty"`
|
|
// Security level for mail going to this domain (we send to them).
|
|
OutgoingSecLevel SecLevel `protobuf:"varint,3,opt,name=outgoing_sec_level,json=outgoingSecLevel,enum=domaininfo.SecLevel" json:"outgoing_sec_level,omitempty"`
|
|
}
|
|
|
|
func (m *Domain) Reset() { *m = Domain{} }
|
|
func (m *Domain) String() string { return proto.CompactTextString(m) }
|
|
func (*Domain) ProtoMessage() {}
|
|
func (*Domain) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
func init() {
|
|
proto.RegisterType((*Domain)(nil), "domaininfo.Domain")
|
|
proto.RegisterEnum("domaininfo.SecLevel", SecLevel_name, SecLevel_value)
|
|
}
|
|
|
|
func init() { proto.RegisterFile("domaininfo.proto", fileDescriptor0) }
|
|
|
|
var fileDescriptor0 = []byte{
|
|
// 189 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xc9, 0xcf, 0x4d,
|
|
0xcc, 0xcc, 0xcb, 0xcc, 0x4b, 0xcb, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x42, 0x88,
|
|
0x28, 0x2d, 0x61, 0xe4, 0x62, 0x73, 0x01, 0x73, 0x85, 0x84, 0xb8, 0x58, 0xf2, 0x12, 0x73, 0x53,
|
|
0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xc0, 0x6c, 0x21, 0x27, 0x2e, 0xa1, 0xcc, 0xbc, 0xe4,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