From: Dan Callaghan <dan@bl2.djc.id.au>
To: sup-commits@supmua.dev
Subject: [sup.git] 02/06: always set MIME-Version header on outgoing mails
Date: Sun, 18 Oct 2026 12:52:24 +1100 [thread overview]
Message-ID: <20261018015223.0BA3829C470@bl2.djc.id.au> (raw)
In-Reply-To: <179228834279.389402.1183876010618010579@bl2.djc.id.au>
New commit on branch develop:
https://supmua.dev/git/sup/commit/38f50a6ce02eaaa0041407e149a7480fc04cea70.html
commit 38f50a6ce02eaaa0041407e149a7480fc04cea70
Author: Dan Callaghan <djc@djc.id.au>
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
next prev parent reply other threads:[~2026-10-18 1:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 1:52 [sup.git] branch develop updated (cf3a2e38 -> c9f29b8d) Dan Callaghan
2026-10-18 1:52 ` [sup.git] 01/06: prepend type:mail to every search before parsing Dan Callaghan
2026-10-18 1:52 ` Dan Callaghan [this message]
2026-10-18 1:52 ` [sup.git] 03/06: unfold headers before further parsing Dan Callaghan
2026-10-18 1:52 ` [sup.git] 04/06: delete unused load_header method Dan Callaghan
2026-10-18 1:52 ` [sup.git] 05/06: move Source.parse_raw_email_header to EditMessageMode Dan Callaghan
2026-10-18 1:52 ` [sup.git] 06/06: ncursesw: 1.4.13 → 1.4.14 Dan Callaghan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261018015223.0BA3829C470@bl2.djc.id.au \
--to=dan@bl2.djc.id.au \
--cc=djc@djc.id.au \
--cc=sup-commits@supmua.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox