Browse Source

fix #2108

Send Message-ID even if DKIM is not enabled, for compatibility with Gmail:

* A workaround for Ergo 2.12.0 is to enable DKIM
* You need to enable either DKIM or SPF (preferably both) to send to Gmail anyway
* You also need forward-confirmed reverse DNS, which can be tricky for IPv6...
tags/v2.13.0-rc1
Shivaram Lingamneni 4 months ago
parent
commit
e11bda643e
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      irc/email/email.go

+ 3
- 0
irc/email/email.go View File

@@ -193,6 +193,9 @@ func ComposeMail(config MailtoConfig, recipient, subject string) (message bytes.
193 193
 	dkimDomain := config.DKIM.Domain
194 194
 	if dkimDomain != "" {
195 195
 		fmt.Fprintf(&message, "Message-ID: <%s@%s>\r\n", utils.GenerateSecretKey(), dkimDomain)
196
+	} else {
197
+		// #2108: send Message-ID even if dkim is not enabled
198
+		fmt.Fprintf(&message, "Message-ID: <%s-%s>\r\n", utils.GenerateSecretKey(), config.Sender)
196 199
 	}
197 200
 	fmt.Fprintf(&message, "Date: %s\r\n", time.Now().UTC().Format(time.RFC1123Z))
198 201
 	fmt.Fprintf(&message, "Subject: %s\r\n", subject)

Loading…
Cancel
Save