From 5132868860f4185cdc54b12b8306b94fda084572 Mon Sep 17 00:00:00 2001 From: tkikuchi <> Date: Sun, 27 Nov 2005 12:21:56 +0000 Subject: email.Message.Message.get_filename() is wrapped because error in this function may stop regular delivery. --- Mailman/Message.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Mailman') diff --git a/Mailman/Message.py b/Mailman/Message.py index d5fd30e7..227f3313 100644 --- a/Mailman/Message.py +++ b/Mailman/Message.py @@ -188,6 +188,16 @@ class Message(email.Message.Message): authors.append(address) return authors + def get_filename(self, failobj=None): + """Some MUA have bugs in RFC2231 filename encoding and cause + mailman to stop delivery in Scrubber.py (called from ToDigest.py). + """ + try: + filename = email.Message.Message.get_filename(self, failobj) + return filename + except (UnicodeDecodeError, UnicodeError, ValueError): + return failobj + class UserNotification(Message): -- cgit v1.2.3