From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by bl2.djc.id.au (Postfix, from userid 1000) id 0BA3829C470; Sun, 18 Oct 2026 12:52:23 +1100 (AEDT) Date: Sun, 18 Oct 2026 12:52:24 +1100 To: sup-commits@supmua.dev Subject: [sup.git] 02/06: always set MIME-Version header on outgoing mails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Reply-To: Dan Callaghan In-Reply-To: <179228834279.389402.1183876010618010579@bl2.djc.id.au> References: <179228834279.389402.1183876010618010579@bl2.djc.id.au> Thread-Index: AQAAEjRWNCbjvxiESNeReEpYhFO1Gg== X-Git-Host: bl2.djc.id.au X-Git-Repo: sup.git X-Git-Refname: refs/heads/develop X-Git-Reftype: branch X-Git-Rev: 38f50a6ce02eaaa0041407e149a7480fc04cea70 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.7.dev Auto-Submitted: auto-generated Message-Id: <20261018015223.0BA3829C470@bl2.djc.id.au> From: Dan Callaghan List-Id: New commit on branch develop: https://supmua.dev/git/sup/commit/38f50a6ce02eaaa0041407e149a7480fc04cea70.html commit 38f50a6ce02eaaa0041407e149a7480fc04cea70 Author: Dan Callaghan AuthorDate: Sun Oct 11 16:32:24 2026 +1100 always set MIME-Version header on outgoing mails Sup unconditionally fills Content-Type and Content-Transfer-Encoding headers and these are supposedly MIME headers, and thus a corresponding MIME-Version header is also required. Rspamd applies a penalty to mails originating from Sup because of the missing MIME-Version header. Add MIME-Version unconditionally. Also move the Content-Type header down lower to sit alongside Content-Transfer-Encoding, rather than at the very top of the message, just for tidiness' sake. --- lib/sup/modes/edit_message_mode.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sup/modes/edit_message_mode.rb b/lib/sup/modes/edit_message_mode.rb index a9978cd3..8cba15ba 100644 --- a/lib/sup/modes/edit_message_mode.rb +++ b/lib/sup/modes/edit_message_mode.rb @@ -553,7 +553,6 @@ protected def build_message date m = RMail::Message.new - m.header["Content-Type"] = "text/plain; charset=#{$encoding}" m.body = @body.join("\n") m.body += "\n" + sig_lines.join("\n") unless @sig_edited ## body must end in a newline or GPG signatures will be WRONG! @@ -601,8 +600,9 @@ protected m.header["Date"] = date.rfc2822 m.header["Message-Id"] = @message_id m.header["User-Agent"] = "Sup/#{Redwood::VERSION}" + m.header["Content-Type"] = "text/plain; charset=#{$encoding}" m.header["Content-Transfer-Encoding"] ||= +"8bit" - m.header["MIME-Version"] = +"1.0" if m.multipart? + m.header["MIME-Version"] = +"1.0" m end