POP3 and selective download/deletion
Steve Holden
sholden at holdenweb.com
Sat Apr 5 15:49:31 EST 2003
"David Mertz" <mertz at gnosis.cx> wrote in message
news:mailman.1049568069.20218.python-list at python.org...
> "Steve Holden" <sholden at holdenweb.com> wrote previously:
> |Unfortunately the POP3 protocol doesn't allow you download the headers of
a
> |message without downloading the whole thing.
>
> Nonsense. This is part of the script I use to filter SPAM based only
> on headers (so I don't download the large virus/spam message bodies).
There is
> a bit of cruft in that I display some progress information and log some
> actions, but it shows a realistic program.
>
[...]
Indeed. Unfortunately TOP isn't something you can rely on being available on
all servers, and its implementations are inconsistent. The 2.2 docs for
poplib objects say:
"""The POP3 TOP command this method uses, unlike the RETR command, doesn't
set the message's seen flag; unfortunately, TOP is poorly specified in the
RFCs and is frequently broken in off-brand servers. Test this method by hand
against the POP3 servers you will use before trusting it."""
regards
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/
Did you miss PyCon DC 2003? Would you come to PyCOn DC 2004?
More information about the Python-list
mailing list