Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

6 May, 2024: The networking issue during the past two days has been identified and appears to be fixed. Will keep monitoring.


devel / comp.lang.python / What might suddenly provoke this poplib error?

SubjectAuthor
* What might suddenly provoke this poplib error?Chris Green
+- Re: What might suddenly provoke this poplib error?Chris Green
+* Re: What might suddenly provoke this poplib error?MRAB
|`- Re: What might suddenly provoke this poplib error?Chris Green
+* Re: What might suddenly provoke this poplib error?Peter J. Holzer
|`- Re: What might suddenly provoke this poplib error?Chris Green
+- Re: What might suddenly provoke this poplib error?dn
`- Re: What might suddenly provoke this poplib error?Peter J. Holzer

1
What might suddenly provoke this poplib error?

<bvdl1j-c9301.ln1@esprimo.zbmc.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19889&group=comp.lang.python#19889

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: cl...@isbd.net (Chris Green)
Newsgroups: comp.lang.python
Subject: What might suddenly provoke this poplib error?
Date: Thu, 13 Oct 2022 13:47:07 +0100
Lines: 52
Message-ID: <bvdl1j-c9301.ln1@esprimo.zbmc.eu>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 8Hjf9D+gt8Pu87m/fUrexA3iu4GiMBJPQdg6Ynby32FCFYZQU=
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:72na8JuZhDp/bycUnmPd6Ziq21M=
User-Agent: tin/2.6.2-20220130 ("Convalmore") (Linux/5.15.0-48-generic (x86_64))
 by: Chris Green - Thu, 13 Oct 2022 12:47 UTC

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
·

Re: What might suddenly provoke this poplib error?

<ebel1j-bj401.ln1@esprimo.zbmc.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19890&group=comp.lang.python#19890

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: cl...@isbd.net (Chris Green)
Newsgroups: comp.lang.python
Subject: Re: What might suddenly provoke this poplib error?
Date: Thu, 13 Oct 2022 13:53:34 +0100
Lines: 8
Message-ID: <ebel1j-bj401.ln1@esprimo.zbmc.eu>
References: <bvdl1j-c9301.ln1@esprimo.zbmc.eu>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net qJuqpUAamLnsb4PRIy3SggqGWqFX5hP7/UqquEjYnmi9Zs6m0=
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:qrQlPDmfBGFOm34ohSWbSmn1cXs=
User-Agent: tin/2.6.2-20220130 ("Convalmore") (Linux/5.15.0-48-generic (x86_64))
 by: Chris Green - Thu, 13 Oct 2022 12:53 UTC

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
·

Re: What might suddenly provoke this poplib error?

<mailman.700.1665682521.20444.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19893&group=comp.lang.python#19893

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: pyt...@mrabarnett.plus.com (MRAB)
Newsgroups: comp.lang.python
Subject: Re: What might suddenly provoke this poplib error?
Date: Thu, 13 Oct 2022 18:35:11 +0100
Lines: 51
Message-ID: <mailman.700.1665682521.20444.python-list@python.org>
References: <bvdl1j-c9301.ln1@esprimo.zbmc.eu>
<4a99d25f-b795-d727-09d0-e8086e3be11f@mrabarnett.plus.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de fS+ZX0YdrBpfdxQGNOsxFg1o9220p1nR8HGTGyigvyXA==
Return-Path: <python@mrabarnett.plus.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=plus.com header.i=@plus.com header.b=elB8SC8O;
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'traceback': 0.04; '(most':
0.05; 'last):': 0.05; 'exit': 0.07; 'hosting': 0.07;
'subject:error': 0.07; 'else:': 0.09; 'from:addr:python': 0.09;
'problem?': 0.09; 'received:192.168.1.64': 0.09; '(after': 0.16;
'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16;
'message-id:@mrabarnett.plus.com': 0.16; 'python3': 0.16;
'received:84.93': 0.16; 'received:84.93.230': 0.16;
'received:plus.net': 0.16; 'server,': 0.16; 'times,': 0.16;
'wrote:': 0.16; 'server.': 0.19; 'to:addr:python-list': 0.20;
'doubt': 0.22; 'problem,': 0.22; 'code': 0.23; "i'd": 0.24;
'saying': 0.25; 'section': 0.25; 'seems': 0.26; 'chris': 0.28;
'suggest': 0.28; 'error': 0.29; 'header:User-Agent:1': 0.30;
'raise': 0.31; 'program': 0.31; 'minutes,': 0.32;
'received:192.168.1': 0.32; 'server': 0.33; 'header:In-Reply-
To:1': 0.34; 'really': 0.37; "it's": 0.37; 'received:192.168':
0.37; 'file': 0.38; 'error,': 0.38; 'break': 0.39; 'subject:What':
0.40; 'try': 0.40; "there's": 0.61; 'internal': 0.63;
'subject:this': 0.67; 'times': 0.69; 'interesting': 0.71; 'out,':
0.78; 'skip:p 50': 0.84; 'e-mails': 0.93; 'green': 0.96
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019;
t=1665682513; bh=7k9QVynP77r6oysA6dFlXWQXCDA71aYfHBqd2ToQ3Ng=;
h=Date:Subject:To:References:From:In-Reply-To;
b=elB8SC8O7+OvrrsKLM1fdwewefgcCclGY9veOFNe/bDWzkdc5sLdinVbJDCEoYfd+
S2xmQ1BOmMHugyBFmPxNc2sxM94Tbkhvm6Jx3xrZ2ljOM1rlYV8U0NJMCUxvGroVAg
EF2a1SIwNfUhvF2YMlrx2UOv4at3JD33HqN6nfmr4asoa6r+VQPurvk8O3kBtjWCFq
+ef1qeWeBks1FUu9b2NfLmeG2DST1dCxsvsMr/+GqLAUhKVWmwGG2a1WsOhRnQK7dR
F0YoL3Y5X3dMf7Qvb7HhaN4pe++lYX83jEODHLaZlGzfkEJQU+99QTQ0MsyEFpltUT
cIiPZlb9WUReg==
X-Clacks-Overhead: "GNU Terry Pratchett"
X-CM-Score: 0.00
X-CNFS-Analysis: v=2.4 cv=cpKILn0i c=1 sm=1 tr=0 ts=63484c51
a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17
a=IkcTkHD0fZMA:10 a=4-FpMA6rAAAA:8 a=QO5V5U7tAAAA:8 a=kYRtqOcHIvYlCyJF92MA:9
a=QEXdDO2ut3YA:10 a=oUcH5ZleDwtbiW4PWyS7:22 a=zEoEZnOxw-JT089L_GTe:22
X-AUTH: mrabarnett@:2500
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.3
Content-Language: en-GB
In-Reply-To: <bvdl1j-c9301.ln1@esprimo.zbmc.eu>
X-CMAE-Envelope: MS4xfH151Xc2ChF1FxqNDbdcQYwdjTHrQyV2jMhXpWNmpnLAgyZOcmrd5f0PiB/igRhja5ErYLh/Wm1nAIxEjkxte8Eu8QkIH/P1+iC0lrEJKVr/7DBmVx06
HT9rha4o4a/Y2ZHqqQ5QeEsuSDQJECLyBKxvsQeW2HMj2rsu+GAoHcWvD+MaMfRHtWySXNRsl6JoTos47l/9DyS28SZ9xc8WUfQ=
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <4a99d25f-b795-d727-09d0-e8086e3be11f@mrabarnett.plus.com>
X-Mailman-Original-References: <bvdl1j-c9301.ln1@esprimo.zbmc.eu>
 by: MRAB - Thu, 13 Oct 2022 17:35 UTC

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.

Re: What might suddenly provoke this poplib error?

<mailman.701.1665682998.20444.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19894&group=comp.lang.python#19894

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: hjp-pyt...@hjp.at (Peter J. Holzer)
Newsgroups: comp.lang.python
Subject: Re: What might suddenly provoke this poplib error?
Date: Thu, 13 Oct 2022 19:43:16 +0200
Lines: 55
Message-ID: <mailman.701.1665682998.20444.python-list@python.org>
References: <bvdl1j-c9301.ln1@esprimo.zbmc.eu>
<20221013174316.oep3ajplomj6jexq@hjp.at>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="7byijcablhe7l7x7"
X-Trace: news.uni-berlin.de 9sssoNEmoR+wTBCpYWr1GQR+CDH9FMhCQjIKeYGhfGMQ==
Return-Path: <hjp-python@hjp.at>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'content-
type:multipart/signed': 0.05; 'hosting': 0.07; 'subject:error':
0.07; 'content-type:application/pgp-signature': 0.09;
'filename:fname piece:asc': 0.09; 'filename:fname
piece:signature': 0.09; 'filename:fname:signature.asc': 0.09;
'yes.': 0.09; 'problem.': 0.15; '"creative': 0.16; '(after': 0.16;
'__/': 0.16; 'challenge!"': 0.16; 'error"': 0.16; 'from:addr:hjp-
python': 0.16; 'from:addr:hjp.at': 0.16; 'from:name:peter j.
holzer': 0.16; 'hjp@hjp.at': 0.16; 'holzer': 0.16; 'python3':
0.16; 'reality.': 0.16; 'stross,': 0.16; 'url-
ip:212.17.106.137/32': 0.16; 'url-ip:212.17.106/24': 0.16; 'url-
ip:212.17/16': 0.16; 'url:hjp': 0.16; '|_|_)': 0.16; 'wrote:':
0.16; 'server.': 0.19; 'to:addr:python-list': 0.20; 'problem,':
0.22; 'saying': 0.25; 'seems': 0.26; 'chris': 0.28; 'sense': 0.28;
'error': 0.29; 'program': 0.31; 'server': 0.33; 'header:In-Reply-
To:1': 0.34; 'fix': 0.36; "it's": 0.37; 'subject:What': 0.40;
"there's": 0.61; 'received:212': 0.62; 'internal': 0.63;
'received:userid': 0.66; 'subject:this': 0.67; 'url-ip:212/8':
0.69; 'interesting': 0.71; 'provider': 0.75; 'received:at': 0.84;
'pop': 0.91; 'e-mails': 0.93; 'green': 0.96
Mail-Followup-To: python-list@python.org
Content-Disposition: inline
In-Reply-To: <bvdl1j-c9301.ln1@esprimo.zbmc.eu>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <20221013174316.oep3ajplomj6jexq@hjp.at>
X-Mailman-Original-References: <bvdl1j-c9301.ln1@esprimo.zbmc.eu>
 by: Peter J. Holzer - Thu, 13 Oct 2022 17:43 UTC
Attachments: signature.asc (application/pgp-signature)

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!"

Attachments: signature.asc (application/pgp-signature)
Re: What might suddenly provoke this poplib error?

<mailman.703.1665700359.20444.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19896&group=comp.lang.python#19896

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: PythonL...@DancesWithMice.info (dn)
Newsgroups: comp.lang.python
Subject: Re: What might suddenly provoke this poplib error?
Date: Fri, 14 Oct 2022 11:31:56 +1300
Organization: DWM
Lines: 86
Message-ID: <mailman.703.1665700359.20444.python-list@python.org>
References: <bvdl1j-c9301.ln1@esprimo.zbmc.eu>
<07ebefc6-517b-3a3f-48b1-2c37be173b1d@DancesWithMice.info>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de /k4soVL6IuuV1s/EfCPCqAfk36oQTD3N3py6M4bhO/Dg==
Return-Path: <PythonList@DancesWithMice.info>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=danceswithmice.info header.i=@danceswithmice.info
header.b=CO9Ix8LQ; dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.003
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'traceback': 0.04; '(most':
0.05; 'last):': 0.05; 'searching': 0.05; 'exit': 0.07; 'hosting':
0.07; 'subject:error': 0.07; '=dn': 0.09; 'else:': 0.09;
'from:addr:danceswithmice.info': 0.09; 'from:addr:pythonlist':
0.09; 'problem?': 0.09; 'received:192.168.1.64': 0.09; 'updated,':
0.09; '"what': 0.16; '(after': 0.16; 'algorithms': 0.16; 'doc':
0.16; 'faster,': 0.16; 'iirc': 0.16; 'mechanisms': 0.16; 'message-
id:@DancesWithMice.info': 0.16; 'python3': 0.16;
'received:51.254': 0.16; 'received:51.254.211': 0.16;
'received:51.254.211.219': 0.16; 'received:cloud': 0.16;
'received:rangi.cloud': 0.16; 'server,': 0.16; 'ssl/tls': 0.16;
'times,': 0.16; 'tls': 0.16; 'whilst': 0.16; 'wrote:': 0.16;
'probably': 0.17; "can't": 0.17; 'server.': 0.19; 'to:addr:python-
list': 0.20; 'machine': 0.22; 'problem,': 0.22; 'code': 0.23;
'saying': 0.25; 'section': 0.25; 'seems': 0.26; 'again,': 0.26;
'library': 0.26; 'chris': 0.28; 'computer': 0.29; 'error': 0.29;
'header:User-Agent:1': 0.30; 'seem': 0.31; 'raise': 0.31;
'header:Organization:1': 0.31; 'program': 0.31; 'question': 0.32;
'(as': 0.32; 'conversation': 0.32; 'said,': 0.32;
'received:192.168.1': 0.32; 'but': 0.32; 'there': 0.33; 'server':
0.33; 'able': 0.34; 'header:In-Reply-To:1': 0.34; "skip:' 10":
0.37; 'really': 0.37; 'using': 0.37; "it's": 0.37;
'received:192.168': 0.37; 'file': 0.38; 'changes': 0.39; 'use':
0.39; '(with': 0.39; 'break': 0.39; 'security,': 0.40;
'subject:What': 0.40; 'try': 0.40; 'should': 0.40; 'including':
0.60; 'here.': 0.61; "there's": 0.61; 'internal': 0.63; 'email':
0.63; 'range': 0.64; 'updates': 0.64; 'service': 0.64;
'received:51': 0.64; 'thus': 0.64; 'your': 0.64; 'independent':
0.65; 'let': 0.66; 'shows': 0.67; 'subject:this': 0.67; 'url-
ip:3/8': 0.67; 'per': 0.68; 'know.': 0.68; 'times': 0.69; 'older':
0.70; 'interesting': 0.71; 'out,': 0.78; 'added.': 0.84;
'continuity': 0.84; 'skip:p 50': 0.84; 'ultimately': 0.84;
'caused': 0.86; 'disclaimer:': 0.88; 'service,': 0.91; 'e-mails':
0.93; 'green': 0.96
DKIM-Filter: OpenDKIM Filter v2.11.0 vps.rangi.cloud DB6BA55E3
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=danceswithmice.info;
s=staff; t=1665700356;
bh=9xff0VYOCr4un0qQr55MAKFKUYFTI/qGiCmfNrA7jcE=;
h=Date:Subject:To:References:From:In-Reply-To:From;
b=CO9Ix8LQCKlPbJaQs/SogCVmraWTfmsHp/6PKk0ZJqUBk8HHK1BQUaLjp4+rZR0F3
yxJucvek902n+rSoY4LzI4WIqGJTjvez088nk6wuN3i+TXeXd7bAtLV+ZHNmA0BHnj
vp+J9c2SUXgKlZxCrTSW3QtUdZ8RDRSrS4H3M0D0p2Y98rD95zOi000mb8IinSS1Zv
DgX/ifbemhlId9h3TY72sJZJ35rrgJ9wvqsHXoiBO5eBEjXgUGeHvIucFKmGRPmsTw
eYqiFxD5G6ywAAA9AbhOmswUwRLojFXyn2kRAlEvjHddo9g1J+XKBr6jvBLUC7DlYe
G/Y+qY9dyFZkQ==
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.3.2
Content-Language: en-GB
In-Reply-To: <bvdl1j-c9301.ln1@esprimo.zbmc.eu>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <07ebefc6-517b-3a3f-48b1-2c37be173b1d@DancesWithMice.info>
X-Mailman-Original-References: <bvdl1j-c9301.ln1@esprimo.zbmc.eu>
 by: dn - Thu, 13 Oct 2022 22:31 UTC

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

Re: What might suddenly provoke this poplib error?

<ishm1j-j9b21.ln1@esprimo.zbmc.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19897&group=comp.lang.python#19897

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.nntp4.net!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: cl...@isbd.net (Chris Green)
Newsgroups: comp.lang.python
Subject: Re: What might suddenly provoke this poplib error?
Date: Fri, 14 Oct 2022 00:00:02 +0100
Lines: 31
Message-ID: <ishm1j-j9b21.ln1@esprimo.zbmc.eu>
References: <bvdl1j-c9301.ln1@esprimo.zbmc.eu> <20221013174316.oep3ajplomj6jexq@hjp.at> <mailman.701.1665682998.20444.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net VDGBc46U5WcmpijQUBN9ZgV+6DSHWRVPhJiq6M3tRpiBFCMbI=
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:qhb6PQV7zLDR6K7SS1fn4g2+DcA=
User-Agent: tin/2.6.2-20220130 ("Convalmore") (Linux/5.15.0-48-generic (x86_64))
 by: Chris Green - Thu, 13 Oct 2022 23:00 UTC

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
·

Re: What might suddenly provoke this poplib error?

<31im1j-j9b21.ln1@esprimo.zbmc.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19898&group=comp.lang.python#19898

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: cl...@isbd.net (Chris Green)
Newsgroups: comp.lang.python
Subject: Re: What might suddenly provoke this poplib error?
Date: Fri, 14 Oct 2022 00:02:27 +0100
Lines: 19
Message-ID: <31im1j-j9b21.ln1@esprimo.zbmc.eu>
References: <bvdl1j-c9301.ln1@esprimo.zbmc.eu> <4a99d25f-b795-d727-09d0-e8086e3be11f@mrabarnett.plus.com> <mailman.700.1665682521.20444.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net lF6XuRR29v3HpNo9XAVxgQ6mdFRIyzcHK/QU6CakNQpfV2+60=
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:DRA5uh5Ug485qjdcHkPBxVGp1wQ=
User-Agent: tin/2.6.2-20220130 ("Convalmore") (Linux/5.15.0-48-generic (x86_64))
 by: Chris Green - Thu, 13 Oct 2022 23:02 UTC

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
·

Re: What might suddenly provoke this poplib error?

<mailman.705.1665736783.20444.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19900&group=comp.lang.python#19900

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: hjp-pyt...@hjp.at (Peter J. Holzer)
Newsgroups: comp.lang.python
Subject: Re: What might suddenly provoke this poplib error?
Date: Fri, 14 Oct 2022 10:39:35 +0200
Lines: 81
Message-ID: <mailman.705.1665736783.20444.python-list@python.org>
References: <bvdl1j-c9301.ln1@esprimo.zbmc.eu>
<07ebefc6-517b-3a3f-48b1-2c37be173b1d@DancesWithMice.info>
<20221014083935.zi2zwkglbwfu4mgf@hjp.at>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="a4asbkcwgug23p6w"
X-Trace: news.uni-berlin.de UdyJlDnmRS/6fvLUOOrH8AciXJnMNLjxOKfIbDafI8mQ==
Return-Path: <hjp-python@hjp.at>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'comments': 0.03;
'absolute': 0.05; 'content-type:multipart/signed': 0.05; 'else.':
0.07; 'hosting': 0.07; 'subject:error': 0.07; 'content-
type:application/pgp-signature': 0.09; 'filename:fname piece:asc':
0.09; 'filename:fname piece:signature': 0.09;
'filename:fname:signature.asc': 0.09; 'problem?': 0.09;
'updated,': 0.09; '"creative': 0.16; '"what': 0.16; '__/': 0.16;
'another.': 0.16; 'assertions': 0.16; 'cases,': 0.16;
'challenge!"': 0.16; 'from:addr:hjp-python': 0.16;
'from:addr:hjp.at': 0.16; 'from:name:peter j. holzer': 0.16;
'hjp@hjp.at': 0.16; 'holzer': 0.16; 'reality.': 0.16;
'relatively': 0.16; 'ssl/tls': 0.16; 'stross,': 0.16; 'unlikely':
0.16; 'url-ip:212.17.106.137/32': 0.16; 'url-ip:212.17.106/24':
0.16; 'url-ip:212.17/16': 0.16; 'url:hjp': 0.16; '|_|_)': 0.16;
'wrote:': 0.16; 'problem': 0.16; 'says': 0.17; 'probably': 0.17;
"can't": 0.17; 'server.': 0.19; 'to:addr:python-list': 0.20;
'problem,': 0.22; "what's": 0.22; '(and': 0.25; 'anything': 0.25;
'actual': 0.25; 'saying': 0.25; 'seems': 0.26; 'library': 0.26;
'else': 0.27; 'chris': 0.28; 'fact': 0.28; 'sense': 0.28;
'computer': 0.29; 'error': 0.29; 'raise': 0.31; 'think': 0.32;
'question': 0.32; '(as': 0.32; 'but': 0.32; 'there': 0.33;
'server': 0.33; 'able': 0.34; 'header:In-Reply-To:1': 0.34;
'question.': 0.35; 'following': 0.35; 'change': 0.36; 'those':
0.36; 'necessarily': 0.37; 'really': 0.37; "it's": 0.37; 'file':
0.38; 'changes': 0.39; 'consistent': 0.40; 'subject:What': 0.40;
'something': 0.40; 'should': 0.40; 'stated': 0.60; 'here.': 0.61;
"there's": 0.61; 'received:212': 0.62; 'internal': 0.63; 'send':
0.63; 'everything': 0.63; 'range': 0.64; 'clear': 0.64;
'received:userid': 0.66; 'subject:this': 0.67; '[1]': 0.67; 'per':
0.68; 'further': 0.69; 'obvious': 0.69; 'url-ip:212/8': 0.69;
'analysis': 0.69; '[2]': 0.70; 'establish': 0.70; 'client': 0.82;
'left': 0.83; 'conducted': 0.84; 'messages,': 0.84; 'received:at':
0.84; 'side.': 0.84; 'weird': 0.84; 'fixed.': 0.91; 'green': 0.96
Mail-Followup-To: python-list@python.org
Content-Disposition: inline
In-Reply-To: <07ebefc6-517b-3a3f-48b1-2c37be173b1d@DancesWithMice.info>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <20221014083935.zi2zwkglbwfu4mgf@hjp.at>
X-Mailman-Original-References: <bvdl1j-c9301.ln1@esprimo.zbmc.eu>
<07ebefc6-517b-3a3f-48b1-2c37be173b1d@DancesWithMice.info>
 by: Peter J. Holzer - Fri, 14 Oct 2022 08:39 UTC
Attachments: signature.asc (application/pgp-signature)

[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!"

Attachments: signature.asc (application/pgp-signature)
1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor