poplib: problem deleting mails

Donn Cave donn at u.washington.edu
Wed Feb 2 11:56:54 EST 2000


Quoth Carsten Gaebler <gbl at iitb.fhg.de>:
| Gerrit Holl wrote:
[quoting Carsten Gaebler]
|>| The POP3 object's dele() function doesn't delete messages that
|>| have a "Status: O" line in the header. Is that a bug?
|> 
|> Not in Python. It must be your server. Neither the RFC nor the Python
|> module says anything about it.
|
| Must be Python because Netscape can delete those messages - on the
| same server.

I think if you look at the module - poplib.py - you'll see what
he means.  The dele() function simply sends a "DELE" command, with
the indicated message ID number, to the server.  It has no way to
discriminate between messages on the basis of Status lines in their
headers, it doesn't know what's in the message at all.

Now if this fails to delete the message, and Netscape can indeed
delete it, it would be interesting to know what Netscape does.
If you can find that out - maybe you could intercept its POP
session - then it's very likely you can make your Python program
do the same thing.  Another experiment would be to telnet to your
POP service and try the DELE command on one of these messages.

	Donn Cave, University Computing Services, University of Washington
	donn at u.washington.edu



More information about the Python-list mailing list