Re: What might suddenly provoke this poplib error?

2022-10-14 Thread Peter J. Holzer
[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(res

Re: What might suddenly provoke this poplib error?

2022-10-13 Thread Chris Green
Peter J. Holzer 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

Re: What might suddenly provoke this poplib error?

2022-10-13 Thread Chris Green
MRAB 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

Re: What might suddenly provoke this poplib error?

2022-10-13 Thread dn
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 c

Re: What might suddenly provoke this poplib error?

2022-10-13 Thread Peter J. Holzer
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:- [...] >

Re: What might suddenly provoke this poplib error?

2022-10-13 Thread MRAB
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 c

What might suddenly provoke this poplib error?

2022-10-13 Thread Chris Green
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/bi

Re: What might suddenly provoke this poplib error?

2022-10-13 Thread Chris Green
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 · -- https://mail

Re: How to program round this poplib error?

2016-03-11 Thread dieter
b.py", line 377, in _getline > raise error_proto('line too long') > poplib.error_proto: line too long > > > Does anyone have any idea how I can program around this somehow? This is bug "https://bugs.python.org/issue23906";. Following a recommendation from "Laura Creighton", I work around it by import poplib; poplib._MAXLINE=5 -- https://mail.python.org/mailman/listinfo/python-list

Re: How to program round this poplib error?

2016-03-10 Thread cl
s specify which exceptions you are trying to catch. > Yes, I know, but it doesn't really relate to the problem does it. > In this case, I think there are two problems. Firstly, I think > whoever implemented poplib mis-read the POP3 specification, as > they are applying the line-leng

Re: How to program round this poplib error?

2016-03-10 Thread cl
Mark Lawrence wrote: > On 10/03/2016 12:04, c...@isbd.net wrote: > > I have a (fairly simple) Python program that scans through a > > 'catchall' E-Mail address for things that *might* be for me. It sends > > anything that could be for me to my main E-Mail and discards the rest. > > > > However I

Re: How to program round this poplib error?

2016-03-10 Thread Jon Ribbens
t even identify > it so that the trap could report the error and tell me which message > was causing it. You really, really should not be using bare "except:". Always specify which exceptions you are trying to catch. In this case, I think there are two problems. Firstly, I think w

Re: How to program round this poplib error?

2016-03-10 Thread Mark Lawrence
On 10/03/2016 12:04, c...@isbd.net wrote: I have a (fairly simple) Python program that scans through a 'catchall' E-Mail address for things that *might* be for me. It sends anything that could be for me to my main E-Mail and discards the rest. However I *occasionally* get an error from it as fo

How to program round this poplib error?

2016-03-10 Thread cl
I have a (fairly simple) Python program that scans through a 'catchall' E-Mail address for things that *might* be for me. It sends anything that could be for me to my main E-Mail and discards the rest. However I *occasionally* get an error from it as follows:- Traceback (most recent call las

Re: Using poplib to parse headers - Thank You All!

2012-12-10 Thread asklucas
Hello Jean-Claude! Thank you for your post, it helped me a lot! I'm not too new to Python but still struggling to make use of that great language's features. I haven't tested it but since you are interested in syntactic subtleties, I think you can save one iterator (k): for j in popconnection.

no SPA in poplib?

2009-12-09 Thread Gabriel Rossetti
Hello, I couldn't find SPA in poplib, does anyone know of an alternative implementation? Thanks, Gabriel -- Arimaz SA Ingénieur en Informatique Av. du 24 Janvier 11 Ateliers de la Ville de Renens, Atelier 5 1020 Renens, Switzerland www.arimaz.com www.mydeskfriend.com Mob: +41-(0)79-539

poplib

2009-02-10 Thread Gabriel Rossetti
Hello, I am using poplib and I noticed that calls to top() don't return the msg info (2nd index in the returned list, e.g. email.top(1,0)[1]) in the same order, by that I mean the date could be email.top(1,0)[1][2] or email.top(1,0)[1][5], etc. Is there a reason for that other than that

Re: POP3 - Using poplib only shows the first few hundred messages in the mailbox

2008-07-29 Thread SteveC
mple > > herehttp://www.python.org/doc/lib/pop3-example.html > > > import getpass,poplib > > > M =poplib.POP3('localhost') > > M.user(getpass.getuser()) > > M.pass_(getpass.getpass()) > > numMessages = len(M.list()[1]) > > for i in range(

Re: POP3 - Using poplib only shows the first few hundred messages in the mailbox

2008-07-25 Thread MRAB
On Jul 25, 1:18 pm, SteveC <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to use POP3_SSL class of the poplib module to read email > from my gmail account.  I can connect just fine using the example > herehttp://www.python.org/doc/lib/pop3-example.html > > i

Re: POP3 - Using poplib only shows the first few hundred messages in the mailbox

2008-07-25 Thread Timothy Grant
On Fri, Jul 25, 2008 at 5:18 AM, SteveC <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to use POP3_SSL class of the poplib module to read email > from my gmail account. I can connect just fine using the example here > http://www.python.org/doc/lib/pop3-example.ht

POP3 - Using poplib only shows the first few hundred messages in the mailbox

2008-07-25 Thread SteveC
Hello, I am trying to use POP3_SSL class of the poplib module to read email from my gmail account. I can connect just fine using the example here http://www.python.org/doc/lib/pop3-example.html import getpass, poplib M = poplib.POP3('localhost') M.user(getpass.getuser(

poplib 100% cpu usage

2008-07-16 Thread Oli Schacher
Hi all I wrote a multithreaded script that polls mails from several pop/imap accounts. To fetch the messages I'm using the getmail classes ( http://pyropus.ca/software/getmail/ ) , those classes use the poplib for the real pop transaction. When I run my script for a few hours cpu

Re: Using poplib to parse headers - Thank You All!

2008-07-06 Thread Jean-Claude Neveu
ll me if any of my syntax is clumsy, or if I did something the difficult way when Python has an easier or more efficient way to do it. I hope this will be useful for the archives. # import getpass, poplib, email # Set up the connection to the POP server popconnection = poplib.POP3('mail.blah.

Re: poplib - retr() getting stuck

2008-06-26 Thread Roopesh
Thanks for the help. At present I have modified the poplib code as follows (In POP3 and POP3_SSL classes): Is it the correct way? def __init__(self, host, port = POP3_PORT): self.host = host self.port = port msg = "getaddrinfo returns an empty list"

Re: poplib - retr() getting stuck

2008-06-24 Thread Gabriel Genellina
En Fri, 20 Jun 2008 04:37:32 -0300, Roopesh <[EMAIL PROTECTED]> escribió: I am using poplib's retr() to fetch mails from my gmail account. It works fine, in some cases it gets stuck inside the retr() method and does not come out. Probably the server stopped responding. By default, sockets ha

poplib - retr() getting stuck

2008-06-20 Thread Roopesh
Hi, I am using poplib's retr() to fetch mails from my gmail account. It works fine, in some cases it gets stuck inside the retr() method and does not come out. >From the logs I could find that when retr() is called, it stops executing further statements, nor does it throw an exceptions but simply

Re: Using poplib to parse headers

2008-05-28 Thread Tim Roberts
Jean-Claude Neveu <[EMAIL PROTECTED]> wrote: > >I am writing a Python program to check email using POP3. I've tried >the sample code from python.org, and it works great. In other words, >the code below successfully prints out my emails. > >import getpass, p

python and poplib

2006-08-17 Thread 叮叮当当
Hi, all. i have two question with poplib: 1. How to judge if a mail is or not a new mail ? 2. How Can i get the send-mailbox's mail? thanks . -- http://mail.python.org/mailman/listinfo/python-list

Re: poplib Q

2006-07-07 Thread SuperHik
Neil Hodgson wrote: > SuperHik: > >> I did ofc, but I noticed something strange... >> *my* socket module really doesn't have SSL object, >> even tho it's listed in the documentation... >> (not the online docs, but docs that came with my Python version) >> ffs how can that be! > >You are proba

Re: poplib Q

2006-07-06 Thread Neil Hodgson
SuperHik: > I did ofc, but I noticed something strange... > *my* socket module really doesn't have SSL object, > even tho it's listed in the documentation... > (not the online docs, but docs that came with my Python version) > ffs how can that be! You are probably using ActiveState's distribu

Re: poplib Q

2006-07-06 Thread SuperHik
Paul McGuire wrote: > "SuperHik" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Hi! >> >> I want to connect to gmail but... >> It requires SSL so I worte: >> >> >>> import poplib >> >>>

Re: poplib Q

2006-07-06 Thread Paul McGuire
"SuperHik" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi! > > I want to connect to gmail but... > It requires SSL so I worte: > > >>> import poplib > >>> server = poplib.POP3_SSL('pop.gmail.com',995) > Traceb

poplib Q

2006-07-06 Thread SuperHik
Hi! I want to connect to gmail but... It requires SSL so I worte: >>> import poplib >>> server = poplib.POP3_SSL('pop.gmail.com',995) Traceback (most recent call last): File "", line 1, in ? File "C:\Python24\lib\poplib.py", line 359, in

Re: gmail/poplib: quickly detecting new mail

2006-07-01 Thread Alex Martelli
LJ <[EMAIL PROTECTED]> wrote: ... > 1. is this a standard behavior of pop protocol? (to give me the same > results for any API call on a single login?) > 2. OR is this a peculiarity of gmail Definitely POP3 standard behavior, as a simple reading of the relevant RFC will show (e.g., http://www.i

Re: gmail/poplib: quickly detecting new mail

2006-07-01 Thread Jean-Paul Calderone
On 1 Jul 2006 08:29:51 -0700, LJ <[EMAIL PROTECTED]> wrote: >Hello, > >I'm trying to monitor my gmail account to know when I have obtained a >new email. It seems that once I have logged in, I should be able to >call the stat() function repeatedly to see how many messages are in my >inbox. The pro

gmail/poplib: quickly detecting new mail

2006-07-01 Thread LJ
. (see code sample below) Thanks, LJ --- import poplib import time from email.Parser import Parser parser = Parser() server = poplib.POP3_SSL("pop.gmail.com", 995) print server.user("XXX-MY_EMAIL") print server.pass_("XXX-MY_PW") server.set_debuglevel(0) def ge

Popfile and Poplib - Can They Work Together?

2006-03-15 Thread Frank Churchill
Has anyone used poplib and popfile together? I've tried everything I can think of to specify SRVR in poplib: "127.0.0.1:8081" "127.0.0.1,port=8081" "localhost:8081" "localhost,port=8081" and probably a few other things, but poplib can't see t

Re: Is there anything "better" than impalib/poplib?

2005-09-07 Thread Thomas Guettler
uld allow me to query the server for > specific messages (and fetch them) in a way similar to a OODB? AFAIK there is not a "better" module. There is "getmail" a python script (and module) which can download messages from a pop3 server. I use it instead of fetchmail. Maybe

Is there anything "better" than impalib/poplib?

2005-09-07 Thread Alessandro Bottoni
Is there any module or interface that allow the programmer to access a imap4/pop3 server in a more pythonic (or Object Oriented) way than the usual imaplib and popolib? I mean: is there any module that would allow me to query the server for specific messages (and fetch them) in a way similar to a

Re: Getting/Saving email attachments w/ poplib and email modules

2005-06-22 Thread Mike Meyer
nd plenty of examples that strip the > attachments from an email message, but most (if not all) of them take a > file parameter. My question is this: > > How can i retrieve an email message via poplib and pass it to > email.message_from_string()? A quick look at the poplib documenta

Re: Getting/Saving email attachments w/ poplib and email modules

2005-06-22 Thread Tim Williams
- Original Message - From: <[EMAIL PROTECTED]> > > Here's what I'm trying to do: > > I need to connect to a pop3 server, download all messages, and copy all > of the attachments into a specific directory. The actual email message ## im

Getting/Saving email attachments w/ poplib and email modules

2005-06-21 Thread brettk
ssage, but most (if not all) of them take a file parameter. My question is this: How can i retrieve an email message via poplib and pass it to email.message_from_string()? This is essentially what i'm doing now, ## import email import poplib mimes = ["image/tif","