Skip to content

Commit

Permalink
Merge pull request #2110 from slingamn/msgid
Browse files Browse the repository at this point in the history
fix #2108
  • Loading branch information
slingamn committed Dec 21, 2023
2 parents 6be1ec3 + e11bda6 commit 97d6f9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions irc/email/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ func ComposeMail(config MailtoConfig, recipient, subject string) (message bytes.
dkimDomain := config.DKIM.Domain
if dkimDomain != "" {
fmt.Fprintf(&message, "Message-ID: <%s@%s>\r\n", utils.GenerateSecretKey(), dkimDomain)
} else {
// #2108: send Message-ID even if dkim is not enabled
fmt.Fprintf(&message, "Message-ID: <%s-%s>\r\n", utils.GenerateSecretKey(), config.Sender)
}
fmt.Fprintf(&message, "Date: %s\r\n", time.Now().UTC().Format(time.RFC1123Z))
fmt.Fprintf(&message, "Subject: %s\r\n", subject)
Expand Down

0 comments on commit 97d6f9e

Please sign in to comment.