[python-win32] imap mail parsing - forms of socket timeout/EOF errors
jacob kruger
jacob at blindza.co.za
Tue Dec 6 08:34:04 EST 2022
Hi there
Know haven't posted on this list for a little while now, but, thought
may as well ask if any of you guys have an idea about what seems to be a
pretty common issue, but, with no specific, or consistent workarounds
that am finding mention of via various google searches, etc.
Effectively, if trying to use either the imaplib, or the poplib modules
to query a remote mail server inbox, to then parse the mail messages
contents, to insert them into a postgresql database, for more efficient
querying/referencing, I am, at times - not consistently at all -
receiving one of the two following messages, depending on which
protocol/client I was trying to make use of:-
the error message/exception information am getting from imap is the
following:
imaplib.IMAP4.abort: command: FETCH => socket error: EOF
the pop3 error message is the following:
poplib.error_proto: -ERR EOF
For example, if just run same code against my one test server, with just
100 messages in the inbox, it works fine every time on both protocols,
but, when try run it against the live mailbox, which has over 2 million
mails in it, this happens on a regular, if inconsistent basis when you
try retrieving specific messages each time, based on their server-side
UID/ID.
So, just wondering if anyone has come across things like this before,
has ideas about implementing a form of timeout, or connection renewal,
or if you have ideas about additional resources could try making use of
instead for this type of thing - main thing is want to be able to,
initially at least, just parse all the mail contents, updating the
database on a repeated basis, since this inbox receives a lot of e-mails
every hour/day, and, possibly, later on, be able to retrieve or interact
with mail messages as well?
Thanks in advance
--
Jacob Kruger
+2782 413 4791
Skype: BlindZA
"...resistance is futile...but, acceptance is versatile..."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/python-win32/attachments/20221206/3287ccd1/attachment-0001.html>
More information about the python-win32
mailing list