Re: occasional email gets retrieval stuck
Dave Jagoda <[email protected]> Fri, 3 Nov 2023 23:08:06 -0700
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <CAFne1W-k4ONQeWOZKuO=FKQZJiU=Ui6p06+_xDuh7Ks19q_c7Q@mail.gmail.com> |
--00000000000078216206094d7282 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Does the workaround described here work for your case? https://bugs.python.org/msg246726 That link says: the workaround was to insert import poplib; poplib._MAXLINE =3D 1000000 at > the top of the 'getmail' script. > Thanks, -dj On Wed, Oct 18, 2023 at 12:30=E2=80=AFPM AJ Weber <[email protected]> wrot= e: > Looks like the list is defunct and/or no one cares...even Charles? > > FWIW: I'm not a big Python programmer, but I tracked down the issue to > being the _MAXLINE constant/restriction in poplib. Some spammers are > sending emails with huge line length (I tried increasing it to 4096 and > over 8k to no avail). Python poplib throws an error if a line is that > long. > > (There is apparently some discussion about whether this is truly against > RFC, but that's just FYI.) > > I wrote a separate python "script" that will find the "offending email" > via UID spit out the headers to a log file, then delete it from the > source-server. I tried retrieving it just to mark it read, but for some > reason that didn't help matters. This is obviously a little dangerous, > because all you're left with are the headers of an email you (the > script) deleted...hopefully it wasn't something important! So far every > instance I've come across was pure spam, so good riddance anyway. > > It would be way better if getmail could trap the error/exception and > skip the email somehow so I don't have to get all crazy with the messages= . > > Just posting it to the list in case anyone sees something similar and > wants to know what causes it. > > -AJ > > On 10/9/2023 8:38 AM, AJ Weber wrote: > > Every now and then I see my getmail (cron) job get stuck retrieving > > from comcast. It starts logging that the server "offered" an email > > (and the ID), but getmail could not retrieve it. (Something to that > > effect.) Once one email does this, nothing else is retrieved, so one > > email stops getmail from getting anything further until I manually > > intervene. > > > > In the past, I have had to start guessing and deleting emails from the > > source server (via their webapp) until the "offending email" is gone > > and then getmail is happy again. > > > > Has anyone else seen this issue? > > > > It would be great if I could correlate the IDs getmail is logging to > > the actual messages on the server and narrow-down the culprit. (IDK if > > it's strange headers or message size or encoding or what the issue is.) > > > > It would be even better if getmail would just be able to retrieve the > > mail, of course. > > > > Not sure why one email stops all functionality (actually deletes still > > happen - nothing can be retrieved). The utility is typically very > > reliable. > > > > Any ideas to troubleshoot or fix this issue? > > > > getmail v5.16 > > > > Thanks, > > > > AJ > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --00000000000078216206094d7282--