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)
| 80 | // operator queries (the "@loopback.<domain>" host portion makes |
| 81 | // self-sends greppable across the dataset). |
| 82 | func 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. |
no outgoing calls
no test coverage detected