[issue10574] email.header.decode_header fails if the string contains multiple directives

2010-11-28 Thread Roy H. Han

New submission from Roy H. Han :

email.header.decode_header fails for the following message subject:
::


email.header.decode_header('=?UTF-8?B?MjAxMSBBVVRNIENBTEwgZm9yIE5PTUlO?==?UTF-8?B?QVRJT05TIG9mIFZQIGZvciBNZW1iZXJz?==?UTF-8?B?aGlw?=')


If the directives are removed and the padding problems are fixed, the subject 
parses correctly.
::

email.header.decode_header('=?UTF-8?B?%s==?=' % 
'=?UTF-8?B?MjAxMSBBVVRNIENBTEwgZm9yIE5PTUlO?==?UTF-8?B?QVRJT05TIG9mIFZQIGZvciBNZW1iZXJz?==?UTF-8?B?aGlw?='.replace('=?UTF-8?B?',
 '').replace('?', '').replace('=', ''))

--
components: Library (Lib)
messages: 122772
nosy: starsareblueandfaraway
priority: normal
severity: normal
status: open
title: email.header.decode_header fails if the string contains multiple 
directives
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1

___
Python tracker 
<http://bugs.python.org/issue10574>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1598] unexpected response in imaplib

2009-03-24 Thread Roy H. Han

Roy H. Han  added the comment:

I'm also getting the same error retrieving a message through IMAP from a
Lotus Notes server.


Traceback (most recent call last):
  File "mail.py", line 152, in 
if 'setup' == argument: setup()
  File "mail.py", line 61, in archive
for message in imapBox.read(includes=includes,
excludes=[mail_store_imap.folder_trash]):
  File "/var/www/pylons/scout/scout/lib/mail_store_imap.py", line 89, in
read
returnCode, data = self.server.fetch(messageIndex, '(RFC822)')
  File "/usr/lib/python2.5/imaplib.py", line 437, in fetch
typ, dat = self._simple_command(name, message_set, message_parts)
  File "/usr/lib/python2.5/imaplib.py", line 1055, in _simple_command
return self._command_complete(name, self._command(name, *args))
  File "/usr/lib/python2.5/imaplib.py", line 887, in _command_complete
raise self.abort('command: %s => %s' % (name, val))
imaplib.abort: command: FETCH => unexpected response: ')'

--
nosy: +starsareblueandfaraway

___
Python tracker 
<http://bugs.python.org/issue1598>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1598] unexpected response in imaplib

2009-03-24 Thread Roy H. Han

Roy H. Han  added the comment:

Using a different format, it seems the message involves cryptographic
keys signed by Lotus Notes?

>>> server.fetch(407, '(BODY.PEEK[HEADER] FLAGS)')

To: pers...@place.com
Subject: subject
Message-ID: 
Date: Tue, 28 Oct 2008 17:53:22 -0400
From: per...@place.com
Content-Type: multipart/mixed; boundary="=_mixed 007839E2852574F0_="
MIME-Version: 1.0
X-Mailer: Lotus Notes Release 7.0.2 September 26, 2006
X-MIMETrack: S/MIME Sign by Notes Client on Person(Release
7.0.2|September 26, 2006) at 10/28/2008 05:53:11 PM,Serialize by Notes
Client on Person(Release 7.0.2|September 26, 2006) at 10/28/2008
05:53:11 PM,Serialize complete at 10/28/2008 05:53:11 PM,S/MIME Sign
failed at 10/28/2008 05:53:11 PM: The cryptographic key was not
found,S/MIME Sign by Notes Client on Person(Release 7.0.2|September 26,
2006) at 10/28/2008 05:53:19 PM,Serialize by Notes Client on
Person(Release 7.0.2|September 26, 2006) at 10/28/2008 05:53:19
PM,Serialize complete at 10/28/2008 05:53:20 PM,S/MIME Sign failed at
10/28/2008 05:53:20 PM: The cryptographic key was not found

--

___
Python tracker 
<http://bugs.python.org/issue1598>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com