From 68b61f4742bb03971ad43c86355a0dc52b4fa78a Mon Sep 17 00:00:00 2001
From: Kevin Rocker <me@kevinrocker.com>
Date: Fri, 31 Jul 2026 16:27:25 +0200
Subject: [PATCH] Serve per-thread mbox downloads with an explicit filename

Make the per-thread view consistent with the monthly downloads. Properly
set the .mbox extension/header and use the message-id as the filename.
---
 django/archives/mailarchives/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/django/archives/mailarchives/views.py b/django/archives/mailarchives/views.py
index fbc9731..ad1d238 100644
--- a/django/archives/mailarchives/views.py
+++ b/django/archives/mailarchives/views.py
@@ -728,7 +728,7 @@ def message_mbox(request, msgid):
         {
             'thread': msg.threadid,
         },
-        msgid)
+        msgid, filename='%s.mbox' % quote(msgid, safe=''))
 
 
 @csrf_exempt
-- 
2.54.0

