From 308500382e06c21018fe622fcc445f08f6c78e0c Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 6 Jun 2020 14:38:34 -0400 Subject: [PATCH] Fix incorrect delivery-status Content-Type. --- smtp/relay.go | 2 +- smtp/relay_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/smtp/relay.go b/smtp/relay.go index 53ebe15..81a91e3 100644 --- a/smtp/relay.go +++ b/smtp/relay.go @@ -127,7 +127,7 @@ func deliverRelayFailure(server Server, env Envelope, log *zap.Logger, to, error fmt.Fprintf(tw, "The server failed to relay the message:\n\n%s:\n%s\n", errorStr, sendErr.Error()) sw, err := mw.CreatePart(textproto.MIMEHeader{ - "Content-Type": []string{"delivery-status"}, + "Content-Type": []string{"message/delivery-status"}, }) if err != nil { log.Error("failed to create multipart 1", zap.Error(err)) diff --git a/smtp/relay_test.go b/smtp/relay_test.go index e9f0c15..e486e82 100644 --- a/smtp/relay_test.go +++ b/smtp/relay_test.go @@ -169,7 +169,7 @@ func TestDeliveryFailureMessage(t *testing.T) { return } - expected = "delivery-status" + expected = "message/delivery-status" if part.Header["Content-Type"][0] != expected { t.Errorf("Part 1 type expected %q, got %q", expected, part.Header["Content-Type"][0]) } -- 2.43.5