pietvo / getmail Goto Github PK
View Code? Open in Web Editor NEWGetmail is a suite of python scripts to get mail from external mailboxes to your computer
Getmail is a suite of python scripts to get mail from external mailboxes to your computer
getmail version 5 -- a flexible, extensible mail retrieval system with support for POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs, arbitrary message filtering, single-user and domain-mailboxes, and many other useful features. getmail is Copyright (C) 1998-2021 Charles Cazabon. getmail is licensed for use under the GNU General Public License version 2 (only). See docs/COPYING for specific terms and distribution information. getmail version 5 requires Python version 2.3.3 or later. You can have several installed versions of Python peacefully co-existing, see python.org for details. To install: getmail v.5 uses the standard Python distutils. Do the following as a regular user: python setup.py build Then (probably as root), do: python setup.py install This will install the software as follows: -the four scripts will be installed in <PREFIX>/bin/ -the Python files will be installed under the site-packages directory of your Python installation (typically /usr/local/lib/pythonXXX or /usr/lib/pythonXXX, but may be elsewhere -- this is detected automatically) -the documentation will be installed under <PREFIX>/doc/getmail-<version>/ -the man pages will be installed under <PREFIX>/man/ <PREFIX> is the directory Python was configured to install under (typically either /usr/local/ or /usr/, but may be another value). See the file docs/documentation.html or docs/documentation.txt for details on installing files to directories other than these defaults. The four scripts included in the package (getmail, getmail_maildir, getmail_mbox, and getmail_fetch) will have their "#!"-interpreter line automatically modified to invoke the Python interpreter you run the setup script with. If you later remove this version of Python, and the newer version does not provide a link to the interpreter with that name, you will have to modify the scripts or re-run the setup.py script. See the HTML documentation for details on setting up and using getmail. It is included in the docs subdirectory of the distribution tarball, and will be installed in <PREFIX>/doc/getmail-<version>/ (by default). 10-second summary for personal use: 1. Install getmail 2. mkdir -m 700 ~/.getmail 3. Create ~/.getmail/getmailrc by following the instructions. 4. Run `getmail`. See docs/BUGS for instructions on reporting bugs in this software.
FROM MY LIST POSTS:
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.