Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by mail-b.sr.ht (Postfix) with ESMTPS id 19D03FF0AC for <~emersion/alps-dev@lists.sr.ht>; Tue, 4 Aug 2020 23:55:19 +0000 (UTC) Authentication-Results: mail-b.sr.ht; dkim=fail reason="key not found in DNS" (0-bit key) header.d=c3f.net header.i=@c3f.net header.b=NARtHQKD X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c3f.net; s=key1; t=1596585317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=NDkU4raOreWQbtrJc53/bbhn/Idra3wb9ntPpe5oBJ0=; b=NARtHQKDDv/PN2NKIKSKueUYEezuvEX6r9SgRauPPQ9fVP4LcplsK8PP09oQvUBvFnQ6Th x3J3m7pisMd2g9Y0PO4Hqe9rvYrFdy4RDqCnvHTudNUiw5mJFMOc4/YlU+raeYK5InXq1u 376lR/VMpi9aJeOhdJdJVOFqLthmG2Y6u7ULxBHlmbyez/TkZboxaxTA3IXx7zLUJfSSL1 3CCgDLyhFbUY/7QHwONjiLbyuNl3Wz50MHa1V0Y25/idpaEJiUDdU3R37f5GoY6oJW6zYb FN9KiBQVGxuN7P7UpaapAW//2jH8e0gfbqL0tv781bhEnTiGFZmbZ8o2lWflww== From: Jesse Olson To: ~emersion/alps-dev@lists.sr.ht Cc: Jesse Olson Subject: [PATCH v2] Set Message-Id header Date: Tue, 4 Aug 2020 23:54:44 +0000 Message-Id: <20200804235444.6321-1-j3s@c3f.net> MIME-Version: 1.0 X-Spam-Score: 0.00 Content-Transfer-Encoding: quoted-printable --- > go-message already has a helper to generate Message-Id header fields Oh woops, silly me! Let me know if this patch looks good, it overwrites the Message-Id header as requested! The only thing I noticed is that the header is defined as "Message-Id" rather than "Message-ID", not a big deal but I don't think it's 100% RFC compliant as is. plugins/base/smtp.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/base/smtp.go b/plugins/base/smtp.go index 19c9e0b..de4753f 100644 --- a/plugins/base/smtp.go +++ b/plugins/base/smtp.go @@ -138,7 +138,8 @@ func (msg *OutgoingMessage) WriteTo(w io.Writer) erro= r { if msg.InReplyTo !=3D "" { h.Set("In-Reply-To", msg.InReplyTo) } - // TODO: set Message-ID + + h.Set("Message-Id", mail.GenerateMessageID()) =20 mw, err :=3D mail.CreateWriter(w, h) if err !=3D nil { --=20 2.28.0