Re: occasional email gets retrieval stuck
AJ Weber <[email protected]> Wed, 18 Oct 2023 15:30:07 -0400
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <[email protected]> |
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] >