[ mailman-Patches-891491 ] Scrubber.py patch

SourceForge.net noreply at sourceforge.net
Tue Aug 24 09:58:20 CEST 2004


Patches item #891491, was opened at 2004-02-06 01:26
Message generated for change (Comment added) made by tkikuchi
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=891491&group_id=103

Category: Pipermail
Group: Mailman 2.1
Status: Open
Resolution: None
Priority: 8
Submitted By: Tokio Kikuchi (tkikuchi)
Assigned to: Nobody/Anonymous (nobody)
Summary: Scrubber.py patch

Initial Comment:
Scrubber.py has number of bugs for processing various     
types of attachment and languages and many have     
submitted patches to fix them. This patch item is     
opened to collect such patches for convenience.     
     
This patch corrects:     
     
- if an attached text is composed by win notepad, it     
has no charset specified and actual charset may be     
different from message/list charset. This sometimes     
cause error in composing digest message.     
     
- sometimes, null charset is represented by '' as     
well as None.     
    
- embedded rfc-2822 message is lost if you don't use   
msg.walk()   
   
- special problem with japanese charsets.  
  
- t (stringfied part) may be None which you can't  
append a '\n'.  
  
  
 
  
  

----------------------------------------------------------------------

>Comment By: Tokio Kikuchi (tkikuchi)
Date: 2004-08-24 07:58

Message:
Logged In: YES 
user_id=67709

added a fix for the case of lcset_out <> lcset.



----------------------------------------------------------------------

Comment By: Bernhard Reiter (ber)
Date: 2004-04-14 18:53

Message:
Logged In: YES 
user_id=113859

Thanks for working on the patch. 

----------------------------------------------------------------------

Comment By: Tokio Kikuchi (tkikuchi)
Date: 2004-02-25 10:42

Message:
Logged In: YES 
user_id=67709

uploading revised patch. Now fixes a few more bugs which try
to decode scrub plain text message and result in mojibake.
Also, japanese filename tend to become so long that system
limit may exceeded because of mime encoding, so add an
option not to use the filename in the message but to use
'attachment' as filename. Because this patch spans two files
(Defaults.py.in and Handlers/Scrubber.py) you have to cd
mailman and patch -p1 < this_patch. (Well, I think it is
-p1. If it didn't work, try -p0 ;-)


----------------------------------------------------------------------

Comment By: Jonathan Larmour (jifl)
Date: 2004-02-22 17:25

Message:
Logged In: YES 
user_id=817601

I strongly recommend applying this patch. I received a mail
bounce on a list with an empty charset in a part (i.e.
"charset=") and it caused /var/mailman/cron/senddigest and
thus all digest processing to fail because of this error:

Traceback (most recent call last):
  File "/var/mailman/cron/senddigests", line 94, in ?
    main()
  File "/var/mailman/cron/senddigests", line 86, in main
    mlist.send_digest_now()
  File "/var/mailman/Mailman/Digester.py", line 60, in
send_digest_now
    ToDigest.send_digests(self, mboxfp)
  File "/var/mailman/Mailman/Handlers/ToDigest.py", line
123, in send_digests
    send_i18n_digests(mlist, mboxfp)
  File "/var/mailman/Mailman/Handlers/ToDigest.py", line
295, in send_i18n_digests
    msg = scrubber(mlist, msg)
  File "/var/mailman/Mailman/Handlers/Scrubber.py", line
308, in process
    t = t.encode(charset, 'replace')
  File "/usr/lib/python2.2/encodings/__init__.py", line 51,
in search_function
    mod = __import__(modname,globals(),locals(),'*')

which is something this patch fixes.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=891491&group_id=103


More information about the Mailman-coders mailing list