Merge pull request #78 from wneessen/fix/msgid-too-long

The new messageID generated with #74 is a bit too long by default. Th…
This commit is contained in:
Winni Neessen 2022-10-26 16:01:33 +02:00 committed by GitHub
commit 0c0ddd5f23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

2
msg.go
View file

@ -382,7 +382,7 @@ func (m *Msg) SetMessageID() {
} }
rn, _ := randNum(100000000) rn, _ := randNum(100000000)
rm, _ := randNum(10000) rm, _ := randNum(10000)
rs, _ := randomStringSecure(25) rs, _ := randomStringSecure(17)
pid := os.Getpid() * rm pid := os.Getpid() * rm
mid := fmt.Sprintf("%d.%d%d.%s@%s", pid, rn, rm, rs, hn) mid := fmt.Sprintf("%d.%d%d.%s@%s", pid, rn, rm, rs, hn)
m.SetMessageIDWithValue(mid) m.SetMessageIDWithValue(mid)