mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
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...
This commit is contained in:
parent
b1a0e7cc5c
commit
e11bda643e
1 changed files with 3 additions and 0 deletions
|
|
@ -193,6 +193,9 @@ func ComposeMail(config MailtoConfig, recipient, subject string) (message bytes.
|
||||||
dkimDomain := config.DKIM.Domain
|
dkimDomain := config.DKIM.Domain
|
||||||
if dkimDomain != "" {
|
if dkimDomain != "" {
|
||||||
fmt.Fprintf(&message, "Message-ID: <%s@%s>\r\n", utils.GenerateSecretKey(), 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, "Date: %s\r\n", time.Now().UTC().Format(time.RFC1123Z))
|
||||||
fmt.Fprintf(&message, "Subject: %s\r\n", subject)
|
fmt.Fprintf(&message, "Subject: %s\r\n", subject)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue