--- CookHeaders.py.old Sat Mar 9 22:08:15 2002 +++ CookHeaders.py Sat Mar 9 22:48:05 2002 @@ -20,6 +20,8 @@ import string import re import urlparse +from Mailman.Logging.Syslog import syslog +from Mailman import EncWord from Mailman import mm_cfg @@ -39,6 +41,11 @@ subject = msg.getheader('subject') adminaddr = mlist.GetAdminEmail() fasttrack = msgdata.get('fasttrack') + try: + decodedsubject, charset = EncWord.decode(subject) + subject = decodedsubject + except ValueError, e: + syslog('error', 'Exception while converting message subject' % e) if not msgdata.get('isdigest') and not fasttrack: # Add the subject prefix unless the message is a digest or is being # fast tracked (e.g. internally crafted, delivered to a single user