summaryrefslogtreecommitdiff
path: root/alot
Commit message (Collapse)AuthorAge
* Merge pull request #1129 from dcbaker/submit/py3k-small-fixesPatrick Totzke2017-08-20
|\ | | | | py3k small fixes
| * widgets/globals: drop functools.totalordering from TagWidgetDylan Baker2017-08-19
| | | | | | | | | | | | Implementing the comparison functions as a shared method rather than in terms of each other (as functools.totalordering does) makes the search interface much snappier.
| * widgets/globals: Implement __hash__ for TagWidgetDylan Baker2017-08-19
| | | | | | | | | | | | | | | | Which is required in python3 when implementing the __eq__ method. The implementation caches the hash method, since it's being called each time the focus is changed in the search view. This doesn't really seem correct to me, but I'm not sure it's wrong.
| * widgets/thread: Delete unused variableDylan Baker2017-08-19
| | | | | | | | | | This wasn't caught by static checkers since it is used in the other brach of the if statement containing this value.
| * Use io.BytesIO and io.StringIODylan Baker2017-08-19
| | | | | | | | | | | | | | | | In python3 StringIO and cStringIO are gone. In their place are io.BytesIO and io.StringIO. They are somewhat different in that they are not separated on implementation, but on the type they emulated. BytesIO works like the bytes class (str in python 2), while StringIO works like the str class (unicode in python2).
| * Replace Exception.message with str(Exception)Dylan Baker2017-08-19
| | | | | | | | | | | | In python3 Exception doesn't have a message attribute, the only way to get the string output is to call str() on the Exception. This also works in python 2.7, so go ahead and make that change.
* | Merge pull request #1125 from dcbaker/submit/deprecated-encrypt-by-defaultPatrick Totzke2017-08-20
|\ \ | | | | | | mark old options for encrypt_by_default as deprecated
| * | defaults/alot.rc.specDylan Baker2017-08-18
| |/ | | | | | | Mark all values for [account]encrypt_by_default as deprecated
* | Merge pull request #1127 from lucc/simplifyPatrick Totzke2017-08-19
|\ \ | | | | | | Simplify for loop and string building
| * | Simplify for loop and string buildingLucas Hoffmann2017-08-19
| |/
* | bump versionPatrick Totzke2017-08-19
| |
* | bump version stringPatrick Totzke2017-08-19
|/
* Merge pull request #1095 from dcbaker/submit/use-default-theme-if-no-configDylan Baker2017-08-17
|\ | | | | Load default settings even if a user config doesn't exist
| * settings: Load spec file even if config file is undefined.Dylan Baker2017-08-16
| | | | | | | | | | | | | | | | | | | | This is necessary even if the config file is None to ensure that the spec file is loaded Also mock out the setting.const module in the docs, otherwise they'll fail to generate. Fixes #1094
| * settings/manager: remove duplicate _config from constructorDylan Baker2017-08-16
| | | | | | | | | | SettingsManager sets it's _config attribute to the exact same value twice in the constructor. This is wrong.
* | Merge pull request #1115 from pazz/fix-account-selectionDylan Baker2017-08-17
|\ \ | | | | | | Fix issue with account selection
| * | let SendmailAccount.send_mail cast the mail to strPatrick Totzke2017-08-16
| | | | | | | | | | | | | | | | | | instead of assuming that it already receives a string. The new behaviour is in sync with the type documented for the superclass `Account`.
| * | send complete addresses to settings.get_account_by_addressPatrick Totzke2017-08-16
| | | | | | | | | | | | | | | .. as read from the From-header directly, potentially including realname parts.
| * | ignore realname part in get_account_by_addressPatrick Totzke2017-08-15
| |/ | | | | | | | | This allows to simply pass the content of a messages' From-header value when determining an account to send/save/encrypt from.
* | db/utils: Allow encrypted messages to be put in mixed payloads as wellDylan Baker2017-08-17
| | | | | | | | | | | | | | | | Since a multipart/mixed can contain anything that a normal message could, this should be allowed. The only case that I can think of this actually happening is if an email server takes the original message, puts it in a multipart/mixed, and then attaches it's own message, like on of the annoying "this mail scanned for viruses by <product>".
* | db/utils: Handle multipart/signed inside multipart/mixedDylan Baker2017-08-17
| | | | | | | | | | | | | | | | It is possible (and actual mail clients such as kmail do) to embed a multipart/signed within a multipart/mixed (this is briefly mentioned in the acknowledgements of RFC 3156, and is perfectly valid according to RFC 1341, which says that a multipart/mixed is exactly like a top level message, except that the header may be empty.
* | db/utils: Don't attach invalid signature to unsigned but encrypted messagesDylan Baker2017-08-17
| | | | | | | | | | | | The logic in the comment is faulty. There are perfectly legitimate reasons to encrypt but not sign a message, some of them are fleshed out in the previous commit.
* | alot/crypto: make keys required for detached_signature_forDylan Baker2017-08-17
| | | | | | | | | | | | This function is always passed a key to sign with, and not passing one leads to the first available signing key in the keyring being selected otherwise, which is problematic if one has two signing keys.
* | crypto: Don't sign when encryptingDylan Baker2017-08-17
| | | | | | | | | | | | | | | | | | | | This is a missed difference between pygpgme and gpg, gpg signs by default when encrypting with an attached signature. Since this isn't being toggled it's bad, it's a kind of information leak, and increases the size of the mail for no reason. NOTE: This is the kind of signature proposed by RFC 2440, which we're missing tests for.
* | alot: replace email.Utils with email.utilsDylan Baker2017-08-16
|/ | | | | In python 3 email.Utils doesn't exist, in python 2.7 both do, but Utils is deprecated.
* crypto: simplify check_uid_validityDylan Baker2017-08-14
| | | | | This splits the loop into a closure and a call to any, which makes it a little bit easier to read and understand.
* just use the OpenPGP fingerprint instead of inventing "hash_key"Daniel Kahn Gillmor2017-08-14
|
* convert from pygpgme to the python "gpg" moduleDaniel Kahn Gillmor2017-08-14
| | | | | | | | | | | | | | | This converts from the now abandoned pygpgme project for wrapping gpgme, to the upstream gpgme python bindings (which are descended from the pyme project, before they became official). Largely this change should not be user visible, but there are a couple cases where the new bindings provide slightly more detailed error messages, and alot directly presents those messages to users. This patch has been significantly revised and updated by Dylan Baker, but was originally authored by Daniel Kahn Gillmor. Fixes #1069
* Merge pull request #1111 from dcbaker/submit/signcommand-testsDylan Baker2017-08-14
|\ | | | | Fix issue 1113
| * envelope: Allow signing if address is in "name <email>" formDylan Baker2017-08-11
| | | | | | | | | | | | | | | | | | Currently anything except "user@domain" (such as "User Name <user@domain>"), will not work with the sign command, because settings.get_account_by_address wants just the "user@domain" bit, and we don't split it. Fixes #1113
* | commands: Don't try to sign_by_default without a gpg keyDylan Baker2017-08-11
|/ | | | | | Currently it's possible to set sign_by_default without setting a default key. This is obviously not a good plan for all sorts of reasons. This fixes the two failing tests from the last commit.
* Merge pull request #988 from lucc/move-next-matchingLucas Hoffmann2017-08-07
|\ | | | | Add `move next matching` command in thread buffer
| * Fix operator precedence when matching messagesLucas Hoffmann2017-08-05
| | | | | | | | | | If the querystring did contain an OR the results where misleading as the AND binds stronger.
| * Add missing movements to completionLucas Hoffmann2017-08-05
| |
| * docs: Update docstrings for move commandsLucas Hoffmann2017-08-05
| |
| * Interpret unrecognized movements as search termsLucas Hoffmann2017-08-05
| | | | | | | | | | | | The move command in thread buffers can recognize some predefined targets to move to. All other arguments are interpreted as notmuch queries and the next or previous matching message is moved to.
* | Format class decoratorsLucas Hoffmann2017-08-04
|/
* Merge pull request #1100 from pazz/docs-themingPatrick Totzke2017-08-04
|\ | | | | docs: mention 'content' part in threadline theming
| * docs: mention 'content' part in threadline themingPatrick Totzke2017-08-04
| | | | | | | | | | ... which displays a prefix of the msg contents. This feature was missing in the docs.
* | settings: do not store SettingsManager instance in __init__.pyDylan Baker2017-08-03
| | | | | | | | | | | | | | This can create circular imports in unittests, which causes difficult to debug errors. Fixes #1076
* | Fix message count in statusbar after taggingLucas Hoffmann2017-08-03
|/ | | | | | | | | | | | When the else branch was hit the count was already updated by SearchBuffer.rebuild() before the hitcount calculation was done and the final result was obviously off. This fixes it by just counting the messages in the search result directly. The same code is implicitly already called in the other branch of the if statement. So it is hopefully not a big overhead. Fixes #1098
* command/envelope: Prompt before sending an encrypted message with BccDylan Baker2017-07-27
| | | | | | | | | | | | | | | Currently alot cannot encrypt to Bcc recipients, and it isn't obvious how to implement encrypted BCC without a metadata leak (the key ids of the Bcc recpients would be visible to the to and cc recipients as well as the other bcc recipients). As such it hasn't been implemented yet (although #949) is opened for such encryption. In the mean time alot doesn't encrypt to bcc recipients at all, making the message all but useless (it might be useful to send it to yourself as a blind recipient, or to two email addresses of the same person). Since most people don't know that alot has this limitation, we should really warn them. This adds a prompt before constructing the message for that case.
* Merge pull request #1089 from dcbaker/submit/sign-without-hintDylan Baker2017-07-27
|\ | | | | commands/envelope: Fall back to account for signing key
| * settings/manager: Extend the get_account_by_address with return_defaultDylan Baker2017-07-27
| | | | | | | | | | | | This new return_default flag (which is an optional and default to False) will try to return the default account if it cannot find an account matching the address hint.
| * commands/envelope: Fall back to account for signing keyDylan Baker2017-07-19
| | | | | | | | | | | | | | If there isn't a key provided as an argument to sign or togglesign, fall back to using the account of the sending address to determine the key, otherwise the message will be marked as "to sign", but won't actually be signed. This is the same type of logic used for sign_by_default.
* | db/utils: Improve readabilityDylan Baker2017-07-24
| | | | | | | | | | Nested ternaries are awful to read, especially in this case. Putting it into an if statement is actually more terse, and is much easier to read.
* | db/utils: optimize if statementsDylan Baker2017-07-24
| | | | | | | | | | | | 1) dont use len() to test that a list is non-empty 2) only go down the else clause if it's possible to have a valid signature.
* | db/utils: Support unicode in signaturesDylan Baker2017-07-24
| | | | | | | | | | | | Currently if a signature name has a non-ascii unicode character in it, the thread will fail to load because a UnicodeEncodeError. This patch fixes that by converting the str into unicode.
* | Merge pull request #1085 from dcbaker/submit/system-theme-locationsDylan Baker2017-07-19
|\ \ | |/ |/| settings: Allow loading themes from system locations
| * settings: Allow loading themes from system locationsDylan Baker2017-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds additional system locations to search for theme files, which are either defined as the environment variable XDG_DATA_DIRS, or the generic fallback (per the xdg base directories spec) as /usr/local/share and /usr/share. We then add alot/themees to those paths to search for themes in. This allows a package manager to install the theme files system wide along with alot, and for alot to load them from the system wide directories. The Archlinux alot-git package is already installing the packages like this.