63ce3f770d
This patch solves a problem about the comparison of mails used in foldersort. When foldersort is used, for example with: lambda x,y: -cmp(x,y) The user gets an error: ERROR: While attempting to sync account 'accountname' '<' not supported between instances of 'K' and 'K' Traceback: File "offlineimap3/offlineimap/accounts.py", line 298, in syncrunner self.__sync() File "offlineimap3/offlineimap/accounts.py", line 374, in __sync remoterepos.getfolders() File "offlineimap3/offlineimap/repository/IMAP.py", line 725, in getfolders retval.sort(key=cmp2key(self.foldersort)) The problem is because in Python 3, we must specify all parameters for total_ordering (see https://docs.python.org/3/library/functools.html in the functools.total_ordering block): Given a class defining one or more rich comparison ordering methods, this class decorator supplies the rest. This simplifies the effort involved in specifying all of the possible rich comparison operations: The class must define one of __lt__(), __le__(), __gt__(), or __ge__(). In addition, the class should supply an __eq__() method. Also, see: https://docs.python.org/3.1/library/stdtypes.html#comparisons Instances of a class cannot be ordered with respect to other instances of the same class, or other types of object, unless the class defines enough of the methods __lt__(), __le__(), __gt__(), and __ge__() (in general, __lt__() and __eq__() are sufficient, if you want the conventional meanings of the comparison operators). This patch implements all methods. Closes #33 |
||
---|---|---|
.github | ||
bin | ||
contrib | ||
docs | ||
offlineimap | ||
scripts | ||
test | ||
tests | ||
.coveragerc | ||
.gitignore | ||
.travis.yml | ||
Changelog.maint.md | ||
Changelog.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.rst | ||
COPYING | ||
MAINTAINERS.rst | ||
Makefile | ||
MANIFEST.in | ||
offlineimap.conf | ||
offlineimap.conf.minimal | ||
offlineimap.py | ||
README.md | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
snapcraft.yaml | ||
TODO.rst |
Upstream status (master
branch):
Upstream status (next
branch):
Links:
- Official github code repository: offlineimap
- Website: website
- Wiki: wiki
- Blog: blog
OfflineIMAP
"Get the emails where you need them."
[Official offlineimap][offlineimap3].
Description
OfflineIMAP is software that downloads your email mailbox(es) as local Maildirs. OfflineIMAP will synchronize both sides via IMAP.
Why should I use OfflineIMAP?
IMAP's main downside is that you have to trust your email provider to not lose your email. While certainly unlikely, it's not impossible. With OfflineIMAP, you can download your Mailboxes and make you own backups of your Maildir.
This allows reading your email offline without the need for your mail reader (MUA) to support IMAP operations. Need an attachment from a message without internet connection? No problem, the message is still there.
Project status and future
OfflineIMAP, using Python 3, is based on OfflineIMAP for Python 2. Currently we are updating the source code. These changes should not affect the user (documentation, configuration files,... are the same) but some links or packages could refer to the Python 2 version. In that case, please open an issue.
License
GNU General Public License v2.
Downloads
You should first check if your distribution already packages OfflineIMAP for you. Downloads releases as tarball or zipball.
If you are running Linux Os, you can install offlineimap with:
- openSUSE
zypper in offlineimap
- Arch Linux
pacman -S offlineimap
- fedora
dnf install offlineimap
Feedbacks and contributions
The user discussions, development, announcements and all the exciting stuff take place on the mailing list. While not mandatory to send emails, you can subscribe here.
Bugs, issues and contributions can be requested to both the mailing list or the [official Github project][offlineimap3]. Provide the following information:
- system/distribution (with version)
- offlineimap version (
offlineimap -V
) - Python version
- server name or domain
- CLI options
- Configuration file (offlineimaprc)
- pythonfile (if any)
- Logs, error
- Steps to reproduce the error
The community
- OfflineIMAP's main site is the [project page at Github][offlineimap3].
- There is the OfflineIMAP community's website.
- And finally, the wiki.
Requirements & dependencies
- Python v3+
- rfc6555 (required)
- imaplib2 >= 3.5
- gssapi (optional), for Kerberos authentication
- portalocker (optional), if you need to run offlineimap in Cygwin for Windows
Documentation
All current and updated documentation is on the community's website.
Read documentation locally
You might want to read the documentation locally. Get the sources of the website. For the other documentation, run the appropriate make target:
$ ./scripts/get-repository.sh website
$ cd docs
$ make html # Requires rst2html
$ make man # Requires a2x (http://asciidoc.org)
$ make api # Requires sphinx