mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Include RFC822 From header. (#1743)
The DMARC and DKIM email authentication systems both require the RFC822 From header to function. Kolide currently only includes the configured sender address as the SMTP Envelop From address (e.g., the MAIL FROM command). This patch also includes the configured sender address in the RFC822 email From header which should allow these emails to pass both DKIM and DMARC authentication.
This commit is contained in:
parent
4784eb2322
commit
c873833a5f
1 changed files with 2 additions and 1 deletions
|
|
@ -54,7 +54,8 @@ func getMessageBody(e kolide.Email) ([]byte, error) {
|
|||
mime := `MIME-version: 1.0;` + "\r\n"
|
||||
content := `Content-Type: text/html; charset="UTF-8";` + "\r\n"
|
||||
subject := "Subject: " + e.Subject + "\r\n"
|
||||
msg := []byte(subject + mime + content + "\r\n" + string(body) + "\r\n")
|
||||
from := "From: " + e.Config.SMTPSenderAddress + "\r\n"
|
||||
msg := []byte(subject + from + mime + content + "\r\n" + string(body) + "\r\n")
|
||||
return msg, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue