Hi,

I have the standard IMAP server ('imap' package in YaST) on a Suse 10.3
system. When I tried to access the server directly from an ipython
console using the python imaplib module as a client, it chokes on the
server. See the python session below. Does the imap server shipped by
SuSE not conform to the IMAP protocol, or is there another explanation?

Thanks,
Michael


--- PYTHON SESSION ----

In [1]: import imaplib

In [2]: server = imaplib.IMAP4_SSL("localhost")

In [3]: server.login("goerz", "secret")
Out[3]:
('OK',
['[CAPABILITY IMAP4REV1 LITERAL+ IDLE UIDPLUS NAMESPACE
MAILBOX-REFERRALS BINARY UNSELECT SCAN SORT THREAD=REFERENCES
THREAD=ORDEREDSUBJECT MULTIAPPEND] User goerz authenticated'])

In [4]: server.select()
Out[4]: ('OK', ['285'])

In [5]: server.select()
---------------------------------------------------------------------------
Traceback (most recent call last)

/home/goerz/ in ()

/usr/lib/python2.5/imaplib.py in select(self, mailbox, readonly)
641 else:
642 name = 'SELECT'
--> 643 typ, dat = self._simple_command(name, mailbox)
644 if typ != 'OK':
645 self.state = 'AUTH' # Might have been 'SELECTED'

/usr/lib/python2.5/imaplib.py in _simple_command(self, name, *args)
1053 def _simple_command(self, name, *args):
1054
-> 1055 return self._command_complete(name, self._command(name,
*args))
1056
1057

/usr/lib/python2.5/imaplib.py in _command_complete(self, name, tag)
883 self._check_bye()
884 try:
--> 885 typ, data = self._get_tagged_response(tag)
886 except self.abort, val:
887 raise self.abort('command: %s => %s' % (name, val))

/usr/lib/python2.5/imaplib.py in _get_tagged_response(self, tag)
984
985 try:
--> 986 self._get_response()
987 except self.abort, val:
988 if __debug__:

/usr/lib/python2.5/imaplib.py in _get_response(self)
901 # otherwise first response line received.
902
--> 903 resp = self._get_line()
904
905 # Command completion response?

/usr/lib/python2.5/imaplib.py in _get_line(self)
994 def _get_line(self):
995
--> 996 line = self.readline()
997 if not line:
998 raise self.abort('socket error: EOF')

/usr/lib/python2.5/imaplib.py in readline(self)
1160 line = []
1161 while 1:
-> 1162 char = self.sslobj.read(1)
1163 line.append(char)
1164 if char == "\n": return ''.join(line)

: (8, 'EOF occurred in violation of protocol')