getmail with python 3 adpatations
$NAME <[email protected]>
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <20200510214058.birzqhk36mi63oqn@archlinux> |
I use getmail in mailwizard. Recently Archlinux has dropped getmail, because it does not support Python 3 (and they are slowly trying to do without python 2 as that is not maintained any more). So I gave it a try to adapt it such that it works for both Python 3 and Python 2.7. It is on https://github.com/rpuntaie/getmail I made it work for Python 3 and Python 2.7 based on tests with mailwizard using just my emails. Mailwizard itself uses only the POP3 part, but I also called getmail separately with an IMAP SSL account. See below the few tests I did. This is not really abundant testing, but since gmail is used a lot, it might work for a lot of people also with Python 3. @Charles Cazabon: I have read somewhere that you have reduced your efforts to basic maintenance. Would that include taking over the changes I made? Could you expose the code to some more tests? I made a new major version, 6, because of the breaking changes, by which python versions older than 2.7 will not work any more. I did not test such older versions. I dropped some code that is only for older versions of python. Other than that I kept my changes minimal. My tests on Archlinux, which has python=python3: python2 getmail [email protected] --getmaildir=/home/roland/.local/etc/getmail python getmail [email protected] --getmaildir=/home/roland/.local/etc/getmail rcfile:: [retriever] type = SimplePOP3SSLRetriever server = mail.upcmail.at username = [email protected] port = 995 password_command = ("pass", "magenta.at/[email protected]") [destination] type = Maildir path = /home/roland/Mail/[email protected]/INBOX/ [options] read_all = true delete = true #message_log = /home/roland/.local/var/log/getmail.log python2 getmail [email protected] --getmaildir=/home/roland/.local/etc/getmail python getmail [email protected] --getmaildir=/home/roland/.local/etc/getmail rcfile:: [retriever] type = SimpleIMAPSSLRetriever server = imap.gmail.com username = [email protected] port = 993 password_command = ("pass", "gmail/[email protected]") [destination] type = Maildir path = /home/roland/Mail/[email protected]/INBOX/ [options] read_all = true delete = true #message_log = /home/roland/.local/var/log/getmail.log