[bug] imaplib case sensitive

P

Petite Abeille

Hello,

Looks like imaplib is case sensitive, even though the IMAP protocol isn't:

(1) Except as noted otherwise, all alphabetic characters
are case-insensitive. The use of upper or lower case
characters to define token strings is for editorial clarity
only. Implementations MUST accept these strings in a
case-insensitive fashion.

http://tools.ietf.org/html/rfc3501#section-9

For example:

[Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) ]
[imaplib 2.58]

import imaplib

M = imaplib.IMAP4( 'localhost', 1143 )
M.login( 'user', 'password' )
M.select()
typ, data = M.search(None, 'ALL')
for num in data[0].split():
typ, data = M.fetch(num, '(ENVELOPE)')
print 'Message %s\n%s\n' % (num, data[0][1])
M.close()
M.logout()

Traceback (most recent call last):
File "Test.py", line 3, in <module>
M = imaplib.IMAP4( 'localhost', 1143 )
File "python2.6/imaplib.py", line 184, in __init__
self.welcome = self._get_response()
File "python2.6/imaplib.py", line 935, in _get_response
raise self.abort("unexpected response: '%s'" % resp)
imaplib.abort: unexpected response: '* ok imap4rev1'

Note the 'ok' tag in lower case.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Memory errors with imaplib 6
IMAP SEARCH Error 2
IMAP4 and deleting a message 1
IMAP Tkinter Issue 0
IMAP mailwatcher w/Tkinter 0

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top