Add return-path according to RFC5321
j3s j3s@c3f.net
Wed, 20 Nov 2019 23:26:15 -0600
1 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
main.go
→
main.go
@@ -351,13 +351,14 @@ }
} newEmail := email.NewEmail() - newEmail.Sender = "bounces-" + l.Address + newEmail.Sender = l.Address newEmail.From = e.From newEmail.To = e.To newEmail.Cc = e.Cc newEmail.Recipients = recipients newEmail.Subject = e.Subject newEmail.Text = e.Text + newEmail.Headers["Return-Path"] = []string{"bounce-" + l.Address} newEmail.Headers["Date"] = e.Headers["Date"] newEmail.Headers["Reply-To"] = []string{e.From} newEmail.Headers["Precedence"] = []string{"list"}