From ce32b3a6223efac121fc0df59e5316cfb6b8d3a0 Mon Sep 17 00:00:00 2001
From: Mark Sapiro <mark@debian.org>
Date: Tue, 19 Oct 2021 11:14:11 +0800
Subject: [PATCH] 2

---
 Mailman/Handlers/Scrubber.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py
index 429312b..08ae55a 100644
--- a/Mailman/Handlers/Scrubber.py
+++ b/Mailman/Handlers/Scrubber.py
@@ -87,6 +87,9 @@ def guess_extension(ctype, ext):
     all = guess_all_extensions(ctype, strict=False)
     if ext in all:
         return ext
+    if ctype.lower == 'application/octet-stream':
+          # For this type,all[0] is '.obj'.'.bin' is better.
+          return '.bin'
     return all and all[0]
 
 
-- 
2.27.0

