[Zope-Checkins] CVS: Zope3/lib/python/Zope/Server/POP3 - IPOP3CommandHandler.py:1.1.2.3 IPOP3Message.py:1.1.2.2 IPOP3MessageList.py:1.1.2.2 POP3Message.py:1.1.2.2 POP3MessageList.py:1.1.2.3 POP3Server.py:1.1.2.5 POP3ServerChannel.py:1.1.2.5 POP3StatusMessages.py:1.1.2.3
Shane Hathaway
shane@cvs.zope.org
Thu, 11 Apr 2002 10:13:18 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/Server/POP3
In directory cvs.zope.org:/tmp/cvs-serv24692/POP3
Modified Files:
Tag: Zope3-Server-Branch
IPOP3CommandHandler.py IPOP3Message.py IPOP3MessageList.py
POP3Message.py POP3MessageList.py POP3Server.py
POP3ServerChannel.py POP3StatusMessages.py
Log Message:
Removed CRs
=== Zope3/lib/python/Zope/Server/POP3/IPOP3CommandHandler.py 1.1.2.2 => 1.1.2.3 === (929/1029 lines abridged)
-#
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-
-from Interface import Interface
-
-class IPOP3CommandHandler(Interface):
- """This interface lists the implemented POP3 commands following
- RFC 1939. Some advanced commands specified in RFC 2449 are also
- listed.
- """
-
- def cmd_apop(args):
- """APOP name digest
-
- Arguments:
- a string identifying a mailbox and a MD5 digest string
- (both required)
-
- Restrictions:
- may only be given in the AUTHORIZATION state after the POP3
- greeting
-
- Discussion:
- Normally, each POP3 session starts with a USER/PASS
- exchange. This results in a server/user-id specific
- password being sent in the clear on the network. For
- intermittent use of POP3, this may not introduce a sizable
- risk. However, many POP3 client implementations connect to
- the POP3 server on a regular basis -- to check for new
- mail. Further the interval of session initiation may be on
- the order of five minutes. Hence, the risk of password
- capture is greatly enhanced.
-
- An alternate method of authentication is required which
- provides for both origin authentication and replay
- protection, but which does not involve sending a password
[-=- -=- -=- 929 lines omitted -=- -=- -=-]
+ The unique-id of a message is an arbitrary server-determined
+ string, consisting of characters in the range 0x21 to 0x7E,
+ which uniquely identifies a message within a maildrop and
+ which persists across sessions. The server should never reuse
+ an unique-id in a given maildrop, for as long as the entity
+ using the unique-id exists.
+
+ Note that messages marked as deleted are not listed.
+
+ Possible Responses:
+ +OK unique-id listing follows
+ -ERR no such message
+
+ Examples:
+ C: UIDL
+ S: +OK
+ S: 1 whqtswO00WBw418f9t5JxYwZ
+ S: 2 QhdPYR:00WBw1Ph7x7
+ S: .
+ ...
+ C: UIDL 2
+ S: +OK 2 QhdPYR:00WBw1Ph7x7
+ ...
+ C: UIDL 3
+ S: -ERR no such message, only 2 messages in maildrop
+ """
+
+ def cmd_user(args):
+ """USER name
+
+ Arguments:
+ a string identifying a mailbox (required), which is of
+ significance ONLY to the server
+
+ Restrictions:
+ may only be given in the AUTHORIZATION state after the POP3
+ greeting or after an unsuccessful USER or PASS command
+
+ Possible Responses:
+ +OK name is a valid mailbox
+ -ERR never heard of mailbox name
+
+ Examples:
+ C: USER mrose
+ S: +OK mrose is a real hoopy frood
+ ...
+ C: USER frated
+ S: -ERR sorry, no mailbox for frated here
+ """
+
=== Zope3/lib/python/Zope/Server/POP3/IPOP3Message.py 1.1.2.1 => 1.1.2.2 ===
-#
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-
-from Interface import Interface
-
-class IPOP3Message(Interface):
- """THis interface describes the methods that are expected of a
- message by the POP3 server.
- """
-
- def isDeleted():
- """Return the 'deleted' status of the message.
- """
-
- def setDeleted(deleted=1):
- """Set the message as delted or not-deleted.
- """
-
- def getEntireMessage():
- """Return the entire message, including headers.
- """
-
- def getBody():
- """Return only the body of the message.
- """
-
- def getSize():
- """Return the size of the message in octets.
- """
-
- def getUID():
- """Get a unique id, following th eguidelines given in the POP3 RFC
- in the UIDL section.
- """
-
-
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+
+from Interface import Interface
+
+class IPOP3Message(Interface):
+ """THis interface describes the methods that are expected of a
+ message by the POP3 server.
+ """
+
+ def isDeleted():
+ """Return the 'deleted' status of the message.
+ """
+
+ def setDeleted(deleted=1):
+ """Set the message as delted or not-deleted.
+ """
+
+ def getEntireMessage():
+ """Return the entire message, including headers.
+ """
+
+ def getBody():
+ """Return only the body of the message.
+ """
+
+ def getSize():
+ """Return the size of the message in octets.
+ """
+
+ def getUID():
+ """Get a unique id, following th eguidelines given in the POP3 RFC
+ in the UIDL section.
+ """
+
+
=== Zope3/lib/python/Zope/Server/POP3/IPOP3MessageList.py 1.1.2.1 => 1.1.2.2 ===
-#
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-
-from Interface import Interface
-
-class IPOP3MessageList(Interface):
- """
- """
-
- def open():
- """Open the mailbox and create the message list.
- """
-
- def close():
- """Close the mailbox.
-
- Here the messages that are marked as 'deleted' should be
- removed before saving the list.
- """
-
- def exists(index):
- """Check whether this index exists in this Message List.
- """
-
- def getMessages():
- """Return a list of non-deleted messages.
- """
-
- def getMessage(index):
- """Return the message of the given index.
- """
-
- def getTotalSize():
- """Get the total size of all non-deleted messages.
- """
-
- def getIndex(message):
- """Get the index of a particular method."""
-
-
- def __getitem__(index):
- """Get the message wuth the specified 'index'.
- """
-
-
-
-
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+
+from Interface import Interface
+
+class IPOP3MessageList(Interface):
+ """
+ """
+
+ def open():
+ """Open the mailbox and create the message list.
+ """
+
+ def close():
+ """Close the mailbox.
+
+ Here the messages that are marked as 'deleted' should be
+ removed before saving the list.
+ """
+
+ def exists(index):
+ """Check whether this index exists in this Message List.
+ """
+
+ def getMessages():
+ """Return a list of non-deleted messages.
+ """
+
+ def getMessage(index):
+ """Return the message of the given index.
+ """
+
+ def getTotalSize():
+ """Get the total size of all non-deleted messages.
+ """
+
+ def getIndex(message):
+ """Get the index of a particular method."""
+
+
+ def __getitem__(index):
+ """Get the message wuth the specified 'index'.
+ """
+
+
+
+
=== Zope3/lib/python/Zope/Server/POP3/POP3Message.py 1.1.2.1 => 1.1.2.2 ===
-#
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-
-from Zope.Server.POP3.IPOP3Message import IPOP3Message
-import md5
-
-class POP3Message:
-
- __implements__ = IPOP3Message
-
-
- def __init__(self, rfc822_msg):
- """ """
- self.rfc822_msg = rfc822_msg
- self._deleted = 0
-
- ############################################################
- # Implementation methods for interface
- # Zope.Server.POP3.IPOP3Message.
-
- def isDeleted(self):
- 'See Zope.Server.POP3.IPOP3Message.IPOP3Message'
- return self._deleted
-
- def setDeleted(self, deleted=1):
- 'See Zope.Server.POP3.IPOP3Message.IPOP3Message'
- self._deleted = deleted
-
- def getEntireMessage(self):
- 'See Zope.Server.POP3.IPOP3Message.IPOP3Message'
- self.rfc822_msg.fp.seek(0)
- return self.rfc822_msg.fp.read()
-
- def getBody(self):
- 'See Zope.Server.POP3.IPOP3Message.IPOP3Message'
- return self.rfc822_msg.fp.read()
-
- def getSize(self):
- 'See Zope.Server.POP3.IPOP3Message.IPOP3Message'
- return len(self.getEntireMessage())
-
- def getUID(self):
- 'See Zope.Server.POP3.IPOP3Message.IPOP3Message'
- hash = md5.md5(self.getBody())
- return hash.hexdigest()
-
- #
- ############################################################
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+
+from Zope.Server.POP3.IPOP3Message import IPOP3Message
+import md5
+
+class POP3Message:
+
+ __implements__ = IPOP3Message
+
+
+ def __init__(self, rfc822_msg):
+ """ """
+ self.rfc822_msg = rfc822_msg
+ self._deleted = 0
+
+ ############################################################
+ # Implementation methods for interface
+ # Zope.Server.POP3.IPOP3Message.
+
+ def isDeleted(self):
+ 'See Zope.Server.POP3.IPOP3Message.IPOP3Message'
+ return self._deleted
+
+ def setDeleted(self, deleted=1):
+ 'See Zope.Server.POP3.IPOP3Message.IPOP3Message'
+ self._deleted = deleted
+
+ def getEntireMessage(self):
+ 'See Zope.Server.POP3.IPOP3Message.IPOP3Message'
+ self.rfc822_msg.fp.seek(0)
+ return self.rfc822_msg.fp.read()
+
+ def getBody(self):
+ 'See Zope.Server.POP3.IPOP3Message.IPOP3Message'
+ return self.rfc822_msg.fp.read()
+
+ def getSize(self):
+ 'See Zope.Server.POP3.IPOP3Message.IPOP3Message'
+ return len(self.getEntireMessage())
+
+ def getUID(self):
+ 'See Zope.Server.POP3.IPOP3Message.IPOP3Message'
+ hash = md5.md5(self.getBody())
+ return hash.hexdigest()
+
+ #
+ ############################################################
=== Zope3/lib/python/Zope/Server/POP3/POP3MessageList.py 1.1.2.2 => 1.1.2.3 ===
-#
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-import mailbox
-import os
-from cStringIO import StringIO
-
-from IPOP3MessageList import IPOP3MessageList
-from POP3Message import POP3Message
-
-class POP3MessageList:
-
- __implements__ = IPOP3MessageList
-
-
-
- def __init__(self, maildir, maildrop=None):
- """ """
- self.maildir = maildir
- self.maildrop = maildrop
-
- self._messagelist = []
- self._mb = None
-
- ############################################################
- # Implementation methods for interface
- # Zope.Server.POP3.IPOP3MessageList.
-
- def open(self, maildrop=None):
- 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
- if maildrop is None:
- maildrop = self.maildrop
- else:
- self.maildrop = maildrop
- md_file = StringIO()
- self.maildir.readfile(maildrop, 'r', md_file)
- self._mb = mailbox.UnixMailbox(md_file)
- msg = self._mb.next()
- self._messagelist = []
- while msg is not None:
- self._messagelist.append(POP3Message(msg))
- msg = self._mb.next()
-
-
- def close(self):
- 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
- mb_str = ''
- for msg in self.getMessages():
- mb_str += msg.getEntireMessage()
- self._mb.fp.close()
- self.maildir.writefile(self.maildrop, 'w', StringIO(mb_str))
-
-
- def exists(self, index):
- 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
- if index > 0 and index <= len(self._messagelist):
- return 1
- return 0
-
-
- def getMessages(self):
- 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
- return filter(lambda msg: not msg.isDeleted(), self._messagelist)
-
-
- def getMessage(self, index):
- 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
- return self._messagelist[index-1]
-
-
- def getTotalSize(self):
- 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
- sizes = map(lambda msg: msg.getSize(), self.getMessages())
- if sizes:
- return reduce(lambda x, y: x+y, sizes)
- else:
- return 0
-
-
- def getIndex(self, message):
- 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
- return self._messagelist.index(message) + 1
-
-
- def __getitem__(self, index):
- 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
- return self.getMessage(index)
-
- #
- ############################################################
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+import mailbox
+import os
+from cStringIO import StringIO
+
+from IPOP3MessageList import IPOP3MessageList
+from POP3Message import POP3Message
+
+class POP3MessageList:
+
+ __implements__ = IPOP3MessageList
+
+
+
+ def __init__(self, maildir, maildrop=None):
+ """ """
+ self.maildir = maildir
+ self.maildrop = maildrop
+
+ self._messagelist = []
+ self._mb = None
+
+ ############################################################
+ # Implementation methods for interface
+ # Zope.Server.POP3.IPOP3MessageList.
+
+ def open(self, maildrop=None):
+ 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
+ if maildrop is None:
+ maildrop = self.maildrop
+ else:
+ self.maildrop = maildrop
+ md_file = StringIO()
+ self.maildir.readfile(maildrop, 'r', md_file)
+ self._mb = mailbox.UnixMailbox(md_file)
+ msg = self._mb.next()
+ self._messagelist = []
+ while msg is not None:
+ self._messagelist.append(POP3Message(msg))
+ msg = self._mb.next()
+
+
+ def close(self):
+ 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
+ mb_str = ''
+ for msg in self.getMessages():
+ mb_str += msg.getEntireMessage()
+ self._mb.fp.close()
+ self.maildir.writefile(self.maildrop, 'w', StringIO(mb_str))
+
+
+ def exists(self, index):
+ 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
+ if index > 0 and index <= len(self._messagelist):
+ return 1
+ return 0
+
+
+ def getMessages(self):
+ 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
+ return filter(lambda msg: not msg.isDeleted(), self._messagelist)
+
+
+ def getMessage(self, index):
+ 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
+ return self._messagelist[index-1]
+
+
+ def getTotalSize(self):
+ 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
+ sizes = map(lambda msg: msg.getSize(), self.getMessages())
+ if sizes:
+ return reduce(lambda x, y: x+y, sizes)
+ else:
+ return 0
+
+
+ def getIndex(self, message):
+ 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
+ return self._messagelist.index(message) + 1
+
+
+ def __getitem__(self, index):
+ 'See Zope.Server.POP3.IPOP3MessageList.IPOP3MessageList'
+ return self.getMessage(index)
+
+ #
+ ############################################################
=== Zope3/lib/python/Zope/Server/POP3/POP3Server.py 1.1.2.4 => 1.1.2.5 ===
from Zope.Server.ServerBase import ServerBase
-from Zope.Server.VFS.OSFileSystem import OSFileSystem
+from Zope.Server.VFS.OSFileSystem import OSFileSystem
from Zope.Server.VFS.IFilesystemAccess import IFilesystemAccess
@@ -31,10 +31,10 @@
def __init__(self, ip, port, maildir, *args, **kw):
-
+
assert IFilesystemAccess.isImplementedBy(maildir)
self.maildir = maildir
-
+
super(POP3Server, self).__init__(ip, port, *args, **kw)
=== Zope3/lib/python/Zope/Server/POP3/POP3ServerChannel.py 1.1.2.4 => 1.1.2.5 ===
str(id(self)) )
self.reply('OK_GREETING', self.secret)
-
+
def _getFilesystem(self):
"""Open the filesystem using the current credentials."""
@@ -134,8 +134,8 @@
self.messagelist[msg_index].setDeleted()
return self.reply('OK_DELETE')
- return self.reply('ERR_MSG_UNKNOWN')
-
+ return self.reply('ERR_MSG_UNKNOWN')
+
def cmd_list(self, args):
'See Zope.Server.POP3.IPOP3CommandHandler.IPOP3CommandHandler'
@@ -168,7 +168,7 @@
'See Zope.Server.POP3.IPOP3CommandHandler.IPOP3CommandHandler'
self.reply('OK_GENERAL')
-
+
def cmd_pass(self, args):
'See Zope.Server.POP3.IPOP3CommandHandler.IPOP3CommandHandler'
password = args
@@ -199,7 +199,7 @@
self.closeMessageList()
self.close()
-
+
def cmd_retr(self, args):
'See Zope.Server.POP3.IPOP3CommandHandler.IPOP3CommandHandler'
try:
@@ -214,13 +214,13 @@
self.write(msg.getEntireMessage())
self.write('\r\n.\r\n')
else:
- return self.reply('ERR_MSG_UNKNOWN')
+ return self.reply('ERR_MSG_UNKNOWN')
def cmd_rset(self, args):
'See Zope.Server.POP3.IPOP3CommandHandler.IPOP3CommandHandler'
for msg in self.messagelist:
- # mark all messages as not-deleted
+ # mark all messages as not-deleted
msg.setDeleted(0)
self.reply('OK_RSET')
@@ -254,9 +254,9 @@
self.write("\r\n".join(lines))
self.write('\r\n.\r\n')
self.flush()
- else:
- return self.reply('ERR_MSG_UNKNOWN')
-
+ else:
+ return self.reply('ERR_MSG_UNKNOWN')
+
def cmd_uidl(self, args):
'See Zope.Server.POP3.IPOP3CommandHandler.IPOP3CommandHandler'
@@ -303,7 +303,7 @@
def openMessageList(self):
self.messagelist = self.message_list_factory(self._getFilesystem())
self.messagelist.open(self.username)
-
+
def closeMessageList(self):
if self.messagelist is not None:
=== Zope3/lib/python/Zope/Server/POP3/POP3StatusMessages.py 1.1.2.2 => 1.1.2.3 ===
-#
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-
-
-status_msgs = {
- 'OK_GENERAL' : '+OK',
- 'OK_GREETING' : '+OK Zope 3 POP3 server ready %s',
- 'OK_LOGIN' : '+OK login successful',
- 'OK_USER' : '+OK %s is a valid mailbox',
- 'OK_QUIT' : '+OK Connection is closing.',
- 'OK_SINGLE_LIST' : '+OK %i %i',
- 'OK_MSG_LIST' : '+OK %i message (%i octets)',
- 'OK_DELETE' : '+OK The message was successfully deleted',
- 'OK_RETR' : '+OK message follows (%i octets)',
- 'OK_RSET' : '+OK Resetting all messages done',
- 'OK_STAT' : '+OK %i %i',
- 'OK_TOP' : '+OK top %i lines of message follows',
- 'OK_APOP' : '+OK maildrop locked and ready',
- 'OK_SINGLE_UIDL' : '+OK %i %s',
- 'OK_MSG_UIDL' : '+OK Unique message id list follows',
- 'OK_CAPA' : '+OK Capability list follows',
-
- 'ERR_CMD_UNKNOWN' : '-ERR unknown command',
- 'ERR_MSG_UNKNOWN' : '-ERR unknown or invalid message id',
- 'ERR_INV_STATE' : '-ERR Invalid State',
- 'ERR_NO_USER' : '-ERR No user was yet specified',
- 'ERR_NOT_USER' : '-ERR never heard of mailbox name',
- 'ERR_LOGIN_MISMATCH' : '-ERR username and password did not match',
-
- 'CMD_UNKNOWN' : '-ERR %s command unknown',
- 'LOGIN_REQUIRED' : '-ERR Not yet logged in.',
- }
-
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+
+
+status_msgs = {
+ 'OK_GENERAL' : '+OK',
+ 'OK_GREETING' : '+OK Zope 3 POP3 server ready %s',
+ 'OK_LOGIN' : '+OK login successful',
+ 'OK_USER' : '+OK %s is a valid mailbox',
+ 'OK_QUIT' : '+OK Connection is closing.',
+ 'OK_SINGLE_LIST' : '+OK %i %i',
+ 'OK_MSG_LIST' : '+OK %i message (%i octets)',
+ 'OK_DELETE' : '+OK The message was successfully deleted',
+ 'OK_RETR' : '+OK message follows (%i octets)',
+ 'OK_RSET' : '+OK Resetting all messages done',
+ 'OK_STAT' : '+OK %i %i',
+ 'OK_TOP' : '+OK top %i lines of message follows',
+ 'OK_APOP' : '+OK maildrop locked and ready',
+ 'OK_SINGLE_UIDL' : '+OK %i %s',
+ 'OK_MSG_UIDL' : '+OK Unique message id list follows',
+ 'OK_CAPA' : '+OK Capability list follows',
+
+ 'ERR_CMD_UNKNOWN' : '-ERR unknown command',
+ 'ERR_MSG_UNKNOWN' : '-ERR unknown or invalid message id',
+ 'ERR_INV_STATE' : '-ERR Invalid State',
+ 'ERR_NO_USER' : '-ERR No user was yet specified',
+ 'ERR_NOT_USER' : '-ERR never heard of mailbox name',
+ 'ERR_LOGIN_MISMATCH' : '-ERR username and password did not match',
+
+ 'CMD_UNKNOWN' : '-ERR %s command unknown',
+ 'LOGIN_REQUIRED' : '-ERR Not yet logged in.',
+ }
+