Re: [Mailman-Users] Uncaught runner exception: 'utf8' codeccan'tdecode bytes in position 1-4: invalid data

2005-09-12 Thread Aliet Santiesteban Sifontes
Mark, I found the problematic email, look at this:
...more mail data here
--TB36FDmn/VVEgNH/
Content-Type: application/msword
Content-Disposition: attachment;
   
filename*=utf-8''C%F3mo%20montar%20un%20servidor%20Samba%20PDC%20en%20una%20red%20de%20m%E1quinas%20MS%20Windows%20XP%
Content-Transfer-Encoding: base64

...more mail data here
--- Mark Sapiro [EMAIL PROTECTED] wrote:

 Aliet Santiesteban Sifontes wrote:
 
 Thank's Mark, how could I find the bad message,
 
 
 You have to look through the digest.mbox file and
 find
 Content-Disposition: headers. Typically, such a
 header might look like
 
 Content-Disposition: attachment;
   filename=Some_name.ext
 
 In your case, the value of the filename= will look
 garbled.
 
 
 I'm
 worried because If I can make the list work again,
 I
 have the risk this happens again, is there any
 patch
 for this??. I think that this can be a potencial
 dos
 attack to other lists on the net.
 
 
 There is no patch that I know of. The actual error
 occurs in the Python
 email library, not in Mailman. The code has changed
 between Mailman
 2.1.5 and 2.1.6, but not in a way that I think would
 avoid the
 exception.
 
 You could try replacing the line
 
 fnext =
 os.path.splitext(msg.get_filename(''))[1]
 
 in /var/lib/mailman/Mailman/Handlers/Scrubber.py
 with
 
 try:
 fnext =
 os.path.splitext(msg.get_filename(''))[1]
 except UnicodeDecodeError:
 fnext = ''
 
 --
 Mark Sapiro [EMAIL PROTECTED]   The highway is
 for gamblers,
 San Francisco Bay Area, Californiabetter use
 your sense - B. Dylan
 
 





__ 
Yahoo! for Good 
Donate to the Hurricane Katrina relief effort. 
http://store.yahoo.com/redcross-donate3/ 

--
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp


Re: [Mailman-Users] Uncaught runner exception: 'utf8' codec can'tdecode bytes in position 1-4: invalid data

2005-09-11 Thread Aliet Santiesteban Sifontes
Thank's Mark, how could I find the bad message, I'm
worried because If I can make the list work again, I
have the risk this happens again, is there any patch
for this??. I think that this can be a potencial dos
attack to other lists on the net.
Best regards

--- Mark Sapiro [EMAIL PROTECTED] wrote:

 Aliet Santiesteban Sifontes wrote:
 
 Hi list, I'm running mailman for several lists on
 debian sarge, mailman-2.1.5-8, suddenly one of of
 the
 lists stops working, maybe by spam or dos attack
 using
 a bug in mailman, here the error, any ideas on how
 ti
 fix this??:
 Sep 11 13:34:35 2005 (12535) Uncaught runner
 exception: 'utf8' codec can't decode bytes in
 position
 1-4: invalid data
 Sep 11 13:34:35 2005 (12535) Traceback (most recent
 call last):
   File /usr/lib/mailman/Mailman/Queue/Runner.py,
 line 111, in _oneloop
 self._onefile(msg, msgdata)
   File /usr/lib/mailman/Mailman/Queue/Runner.py,
 line 167, in _onefile
 keepqueued = self._dispose(mlist, msg, msgdata)
   File
 /usr/lib/mailman/Mailman/Queue/IncomingRunner.py,
 line 130, in _dispose
 more = self._dopipeline(mlist, msg, msgdata,
 pipeline)
   File
 /usr/lib/mailman/Mailman/Queue/IncomingRunner.py,
 line 153, in _dopipeline
 sys.modules[modname].process(mlist, msg,
 msgdata)
   File
 /var/lib/mailman/Mailman/Handlers/ToDigest.py,
 line
 91, in process
 send_digests(mlist, mboxfp)
   File
 /var/lib/mailman/Mailman/Handlers/ToDigest.py,
 line
 132, in send_digests
 send_i18n_digests(mlist, mboxfp)
   File
 /var/lib/mailman/Mailman/Handlers/ToDigest.py,
 line
 306, in send_i18n_digests
 msg = scrubber(mlist, msg)
   File
 /var/lib/mailman/Mailman/Handlers/Scrubber.py,
 line
 265, in process
 url = save_attachment(mlist, part, dir)
   File
 /var/lib/mailman/Mailman/Handlers/Scrubber.py,
 line
 361, in save_attachment
 fnext =
 os.path.splitext(msg.get_filename(''))[1]
   File /usr/lib/python2.3/email/Message.py, line
 731, in get_filename
 return unicode(newvalue[2], newvalue[0] or
 'us-ascii')
 UnicodeDecodeError: 'utf8' codec can't decode bytes
 in
 position 1-4: invalid data
 
 Sep 11 13:34:35 2005 (12535) SHUNTING:

1126458561.9029009+2ca02ecc54d36f4e0a88a7ab17fc28736bd23635
 
 A message has been posted to the list with an
 attached file. The
 scrubber is trying to create a file name for the
 scrubbed attachment
 using the filename of the attachment, but the
 filename is either
 unparseable from the message or garbled in some way.
 
 The bad message is probably in the
 lists/listname/digest.mbox file.
 Try moving that file aside or editing it and see if
 that allows the
 list to resume working. If so, you may be able to
 reprocess the
 shunted messages with bin/unshunt, but that may
 cause the error to
 reappear.
 
 --
 Mark Sapiro [EMAIL PROTECTED]   The highway is
 for gamblers,
 San Francisco Bay Area, Californiabetter use
 your sense - B. Dylan
 
 





__ 
Yahoo! for Good 
Watch the Hurricane Katrina Shelter From The Storm concert 
http://advision.webevents.yahoo.com/shelter 

--
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp