MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / ProviderID

Function ProviderID

internal/loopback/loopback.go:82–90  ·  view source on GitHub ↗

ProviderID synthesizes an RFC 5322-shaped Message-ID for the outbound row's provider_message_id column. Mirrors what an external MTA would have stamped — keeps the column non-empty and recognizable in operator queries (the "@loopback. " host portion makes self-sends greppable across the datas

(fromDomain string)

Source from the content-addressed store, hash-verified

80// operator queries (the "@loopback.<domain>" host portion makes
81// self-sends greppable across the dataset).
82func ProviderID(fromDomain string) string {
83 var b [16]byte
84 _, _ = rand.Read(b[:])
85 host := fromDomain
86 if host == "" {
87 host = "e2a.local"
88 }
89 return fmt.Sprintf("<%s@loopback.%s>", hex.EncodeToString(b[:]), host)
90}
91
92// ComposeMIME builds the RFC 5322 / 2046 message bytes the inbound row
93// will store as raw_message.

Callers 2

performSelfSendMethod · 0.92
DeliverInboundFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected