• What might suddenly provoke this poplib error?

    From Chris Green@21:1/5 to All on Thu Oct 13 13:47:07 2022
    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?



    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Green@21:1/5 to All on Thu Oct 13 13:53:34 2022
    A further little bit of information, I tried running getCatchall.py
    from the command prompt and there was a long wait before it output the
    same error message. I.e. it looks rather as if the server is not
    responding to requests. (A 'long wait' is a minute or two)

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter J. Holzer@21:1/5 to Chris Green on Thu Oct 13 19:43:16 2022
    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.

    hp

    --
    _ | Peter J. Holzer | Story must make more sense than reality.
    |_|_) | |
    | | | hjp@hjp.at | -- Charles Stross, "Creative writing
    __/ | http://www.hjp.at/ | challenge!"

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmNITioACgkQ8g5IURL+ KF3PxhAAl3nVAXhSqeLrYfrR1z+5fYc6xgTGrZdPmHGaQv2c0sZsfFz9WuhVp3NH NfnVsGOoSfdcW8ROlwRljHZD4L4CNeBz6jJL9/CK8JZD2pygKWKqImrBgWDWmeD4 wwMgVEZyvO13uEJ3sQAIQ/8SfsXkYzPcdgbG6+abkMRTKOQ+C53qjEP3pg9QJGal jEO32H8abMkOBL2ZyquGLhpAMYDQFcMsn5o3TmHcZHAlH+KNSLMwYtgMVP/F2SZ6 +su5g1EZsZ4lb87ZujnKlZ51QDjGxHZrYULcd2AKR+T4by+j/gCQomuaGPTjE5eJ 30irVjds9iTDrKUwLGPW6M0w5pjKCby6ojgS1yAaVlyQ6HtRuvEAyd5iPUbNyIGy utHFhUgE6o/ldhdgbfz7DDJ14c/M5Or+7I0ZXTYY3GdBrQSpmnMubfYNxGeC2WvH Qstmd0uq4RCIhlgw74NKPJSvgW+K3YukZ3NrGKEplznj36NTt7+PXFRmxqv14Waf wkEWHiBEgvGdRru5FbWWmf4UyVR+q+YWBbIbslPt3Cj/Vnzkrx3OZIBB4QXWrXJX LA7k3+7gYa/BouinD8q+guc+26m8VzJAds5M2p5zJPWNNcKhQSA5ENx6R17SArI9 J87DuGi2ld67mbB7nEmiQ4bvfrk1a7JD8PPiw/t
  • From MRAB@21:1/5 to Chris Green on Thu Oct 13 18:35:11 2022
    On 2022-10-13 13:47, 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:-

    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?

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Green@21:1/5 to MRAB on Fri Oct 14 00:02:27 2022
    MRAB <python@mrabarnett.plus.com> wrote:
    [snip boring code]

    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.

    I guess I could do that but this has only happened once in quite a few
    years so I'm not sure if I;ll bother! :-)

    The program is only run half-hourly by cron.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Green@21:1/5 to Peter J. Holzer on Fri Oct 14 00:00:02 2022
    Peter J. Holzer <hjp-python@hjp.at> wrote:
    [-- 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.

    After a couple of hours someone obviously fixed something and the
    error has stopped now.

    Thanks everyone.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dn@21:1/5 to Chris Green on Fri Oct 14 11:31:56 2022
    On 14/10/2022 01.47, 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:-

    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?


    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.

    * IIRC the last changes to email lib were circa 3.5, but poplib's doc
    page shows more recent updates - including to timeouts in v3.9 (YMMV).


    There are changes afoot in the TLS arena. Older algorithms being dumped,
    and newer, stronger, harder, faster, better mechanisms (with racing
    stripes) being added. Not using POP3, I can't say how much impact such
    may have...

    Try using an independent checker to investigate continuity of access.
    From your own machine (I use "s_client -connect..." but for IMAP), thus
    should be able to replicate the 'error' conversation at the level of the
    POP3 'conversation'. Alternately, use an on-line service such as: https://www.wormly.com/test-pop3-mail-server
    Disclaimer: again, not using POP3, I have never used this service, it 'popped-up' whilst searching on DuckDuckGo.


    Many general-purpose service/server-providers seem rather heavy-handed
    when it comes to email security, often as a result of some knee-jerk
    response to a 'live-issue' - ultimately caused by them not having
    competent email-specialists on-staff. Accordingly, they may have
    'changed policy' and 'forgotten' to let mere-clients know. (although, if
    your standard email access continues unabated, this seems less-likely)
    That said, it never hurts to ask/be in friendly-contact...


    PS is that really your password? If so, ...
    --
    Regards,
    =dn

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter J. Holzer@21:1/5 to All on Fri Oct 14 10:39:35 2022
    [The OP has stated that the problem has been fixed. The following are
    generic comments about troubleshooting.]

    On 2022-10-14 11:31:56 +1300, dn wrote:
    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.

    I think this should be the second question. The first quesion is: What
    are the actual symptoms?

    In this case we have a relatively clear error message which was
    obviously[2] sent by the server. So anything else must[1] be consistent
    with this error message (and the fact that we were able to get this
    error message in the first place).

    So it can't[1] be TLS, because if you can't establish a connection, the
    server can't send an error message.

    The message also says "internal server error", and this is not something
    a client should be able to provoke. So it's unlikely to be anything on
    the client side.

    What's left is that there was a change or operational error on the
    server side, so further analysis must be conducted there.

    hp


    [1] Take absolute assertions like this with a grain of salt. There are
    always misleading error messages, weird edge cases, etc. But
    consider those only after ruling out everything else.

    [2] What may be obvious to one person is of course not necessarily
    obvious to another.

    --
    _ | Peter J. Holzer | Story must make more sense than reality.
    |_|_) | |
    | | | hjp@hjp.at | -- Charles Stross, "Creative writing
    __/ | http://www.hjp.at/ | challenge!"

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmNJIEAACgkQ8g5IURL+ KF0uKQ//SrUPOPwTjkQUAPIacr0tq6yKugp0tmongY8P7tmCa2foCkoV0IOw1QMp +xlTHbEUD4xiyakJvil7ivCtSVMo5H98Y7BBeEGgXeDYjxtKQOAobisH0az6bvth 7AdoJUsCysUV0WRQ2jfFErdNLEiL8vXsjGlkVjGSyKpEmnvV4gY/whvsuZQqUH6+ 7EtZ2+nzFfkjvpCbef6KnKJAqMfCWE88zGniN4Y5h2bpS16laQZIirKolpFugkbS Jg/CM9r+55/fPK5//6JHdmvYx7pPU7yVJoXwjnUsvk1JAvqTav16XhHYQtuZuXRn XO03eixg8xnRp+m6HWInMG7lqau+gL278WDT1niJxwVe6+kWGZ1RYgOcg3JZtC0L GllDf/cnpYT7QIYWwP93oc/pcjD4D+hGsLG3WAi/3wA9Ce/CR8Dh9kMjCiUKFIVb hWMwjwXaFmJUyNrO/xMLZCBLDRQtBQIY7X3XJdG43vuKUMidSP+BCIN1XORUQPDB qCvlTgn8V3siQZGPAZtteMW+y0bUl+Xc/rL9KkIlbMR/8AyV/TPAouukPylsb41H 9Og2BJijZQJ1HXK4rptPFzgrYu41SFZleKhQPGCRBusS0BYxTa4nvxtcYHmwaQkn PtYorAIMwqNudw3VBBswE0bA7YT5YvEmSTb9WSg