I have a short python3 program that collects E-Mails from a 'catchall' mailbox, sends the few that might be interesting to me and dumps the[...]
rest.
It has suddenly (after working for some years) started throwing the following:-
poplib.error_proto: b'-ERR internal server error'[...]
It seems to be saying that the POP3 server has a problem,
if so there's not much I can do about it as it's my hosting provider's
mail server.
I have a short python3 program that collects E-Mails from a 'catchall' mailbox, sends the few that might be interesting to me and dumps the
rest.
It has suddenly (after working for some years) started throwing the following:-
Traceback (most recent call last):
File "/home/chris/.mutt/bin/getCatchall.py", line 83, in <module>
pop3.pass_('brzmilla')
File "/usr/lib/python3.10/poplib.py", line 218, in pass_
return self._shortcmd('PASS %s' % pswd)
File "/usr/lib/python3.10/poplib.py", line 181, in _shortcmd
return self._getresp()
File "/usr/lib/python3.10/poplib.py", line 157, in _getresp
raise error_proto(resp)
poplib.error_proto: b'-ERR internal server error'
The section of code throwing the error is as follows:-
#
#
# Connect to the POP3 server, get message count, exit if no messages
#
for t in range(10): # retry 10 times
try:
pop3 = poplib.POP3_SSL('mail3.gridhost.co.uk',timeout=300)
break
except TimeoutError:
if t == 9:
log.err("Timed out 10 times, giving up")
exit(1)
else:
log.warn("Timed out, try " + str(t))
pop3.user('catchall@isbd.net')
pop3.pass_('brzmilla')
numMessages = len(pop3.list()[1])
if (numMessages == 0):
break
It seems to be saying that the POP3 server has a problem, if so there's not much I can do about it as it's my hosting provider's mail server. Is it really saying the server has a problem?
It seems to be saying that the POP3 server has a problem, if so there's not much I can do about it as it's my hosting provider's mail server. Is it really saying the server has a problem?
As you've already ascertained that it's a server error, I'd just like to suggest that you add a sleep before retrying. If it has timed out after
5 minutes, I doubt there's much point in retrying immediately.
[-- text/plain, encoding quoted-printable, charset: us-ascii, 28 lines --]
On 2022-10-13 13:47:07 +0100, Chris Green wrote:
I have a short python3 program that collects E-Mails from a 'catchall' mailbox, sends the few that might be interesting to me and dumps the
rest.
It has suddenly (after working for some years) started throwing the following:-[...]
poplib.error_proto: b'-ERR internal server error'[...]
It seems to be saying that the POP3 server has a problem,
Yes. "-ERR" is the normal start of a POP error reply, so the message
"-ERR internal server error" was sent by the POP server.
if so there's not much I can do about it as it's my hosting provider's
mail server.
You can call you hosting provider and ask them to fix the problem.
I have a short python3 program that collects E-Mails from a 'catchall' mailbox, sends the few that might be interesting to me and dumps the
rest.
It has suddenly (after working for some years) started throwing the following:-
Traceback (most recent call last):
File "/home/chris/.mutt/bin/getCatchall.py", line 83, in <module>
pop3.pass_('brzmilla')
File "/usr/lib/python3.10/poplib.py", line 218, in pass_
return self._shortcmd('PASS %s' % pswd)
File "/usr/lib/python3.10/poplib.py", line 181, in _shortcmd
return self._getresp()
File "/usr/lib/python3.10/poplib.py", line 157, in _getresp
raise error_proto(resp)
poplib.error_proto: b'-ERR internal server error'
The section of code throwing the error is as follows:-
#
#
# Connect to the POP3 server, get message count, exit if no messages
#
for t in range(10): # retry 10 times
try:
pop3 = poplib.POP3_SSL('mail3.gridhost.co.uk',timeout=300)
break
except TimeoutError:
if t == 9:
log.err("Timed out 10 times, giving up")
exit(1)
else:
log.warn("Timed out, try " + str(t))
pop3.user('catchall@isbd.net')
pop3.pass_('brzmilla')
numMessages = len(pop3.list()[1])
if (numMessages == 0):
break
It seems to be saying that the POP3 server has a problem, if so there's not much I can do about it as it's my hosting provider's mail server. Is it really saying the server has a problem?
On 14/10/2022 01.47, Chris Green wrote:...
File "/usr/lib/python3.10/poplib.py", line 157, in _getresp
raise error_proto(resp)
poplib.error_proto: b'-ERR internal server error'
It seems to be saying that the POP3 server has a problem, if so
there's not much I can do about it as it's my hosting provider's
mail server. Is it really saying the server has a problem?
There's a range of possibilities here. The first question to ask (as
you probably have) is "what has changed?" - has the Python/PSL on this computer been updated*, has the computer's SSL/TLS library been
updated, etc. Then there are possible changes at 'the other end' - per previous responses.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 448 |
Nodes: | 16 (2 / 14) |
Uptime: | 73:50:49 |
Calls: | 9,254 |
Calls today: | 6 |
Files: | 13,501 |
Messages: | 6,068,404 |