1package mox
2
3import (
4 cryptorand "crypto/rand"
5 "encoding/base64"
6)
7
8// MessageIDGen returns a generated unique random Message-Id value, excluding <>.
9func MessageIDGen(smtputf8 bool) string {
10 buf := make([]byte, 16)
11 cryptorand.Read(buf)
12 return base64.RawURLEncoding.EncodeToString(buf) + "@" + Conf.Static.HostnameDomain.XName(smtputf8)
13}
14