summaryrefslogtreecommitdiff
path: root/alot/commands/envelope.py
Commit message (Collapse)AuthorAge
...
* 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.
* | 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.
* just use the OpenPGP fingerprint instead of inventing "hash_key"Daniel Kahn Gillmor2017-08-14
|
* 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
* 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
* 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.
* 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.
* Also save envelope tags with :saveLucas Hoffmann2017-07-11
|
* Display tags in envelope bufferLucas Hoffmann2017-07-11
|
* Add :tag commands in envelope buffersLucas Hoffmann2017-07-11
|
* commands/envelope: remove unreachable codeDylan Baker2017-01-31
| | | | | | | As the comment suggests this path is effectively unreachable. We have a work around because path is allowed to be None, but we don't want to handle that case. This patch forces path to be provided (which argparse will do), and then removes the unreachable else path.
* Move utils/booleanaction.py to utils/argparse.pyDylan Baker2017-01-25
| | | | | This module is going to be enhanced with additional components in later patches in this series, so it needs a more generic name.
* Use absolute_imports from __future__Lucas Hoffmann2017-01-18
|
* Encrypt for the CC addresses tooRuben Pollan2017-01-01
|
* fix odd continuation and indentationDylan Baker2016-12-27
| | | | This is just whitespace changes.
* Replace unused arguments with _Dylan Baker2016-12-21
| | | | | | | | | | This patch replaces a large number (but not all) unused arguments with the standard ``_`` placeholder. This has the advantage of signaling that these values are unused. There are a number of places that I've chosen not to apply this, largely in methods that have publicly define signatures that they inherit (usually from urwid).
* Don't use dict.keys when not necessaryDylan Baker2016-12-21
| | | | | | | | | | | It's pretty easy to get caught up using dict.keys (or iterkeys) when one doesn't need to. This patch corrects two cases where it's not needed, the first is the case of inclusion. ``x in mydict.keys()`` is equivalent to ``x in mydict``, but without the need to generate a list and walk it. The second case is when calling set() on a dict, ``set(mydict)`` will create a set object of the dict's keys, without the need to create one in memory and is significantly faster than ``set(mydict.keys())`` or even ``set(mydict.iterkeys())``.
* Use dict's iter methodsDylan Baker2016-12-21
| | | | | | | | This patch replaces a number of uses of dict.items, dict.values, and dict.keys with their iterative siblings. The advantage of using the iterator version is that they don't copy the keys, values, or items, but simply return references. This reduces memory usage and may speed up the these operations a bit.
* Replace map() and filter() with comprehensionsDylan Baker2016-12-21
| | | | | | | | This had the advantage of being more readable to people without a functional programming background, and it avoids the need to use lambdas which are both slow and have many corners in python. In a few cases it also allows us to use a generator expression instead of a materialized list, which save some memory.
* Use with blocks to write to temp filesLucas Hoffmann2016-12-18
|
* use open() as context managerDylan Baker2016-12-14
| | | | | | | | | | This uses open() as a context manager instead of calling close() explicitly. This has the advantage of closing even in the event of an exception, being easier to visually inspect for correctness, and being the more modern idiom. This does leave one case of file.close(), where FILE is opened in an if tree.
* Fix except syntaxLucas Hoffmann2016-12-09
|
* Clean up importsLucas Hoffmann2016-12-09
| | | | | | - use relative imports if possible - group imports into standard library, third party, and alot modules - sort imports alphabetically
* Use logging's native string interpolationLucas Hoffmann2016-12-09
|
* Remove braces after `del` and `return`Lucas Hoffmann2016-12-09
| | | | | `del` and `return` are keywords and not functions so the braces are not needed.
* Remove encryption keys from envelope if encryption flag is unset.Lucas Hoffmann2016-03-24
|
* Add --trusted option to envolope commands encrypt and toggleencrypt.Lucas Hoffmann2016-03-24
|
* Fix unsign command for envelope buffers.Lucas Hoffmann2016-03-24
|
* Encrypt on reply to encrypted email and add 'encrypt_by_default' configRuben Pollan2015-12-16
|
* Move email_as_string function from crypto to helper moduleYann Rouillard2014-08-02
| | | | | | | | | The email_as_string function, and the related RFC3156_canonicalize function, are now used by the ForwardCommand and are not specific anymore to the crypto routine. So we move them to the global helper module. fix an import removal mistake while moving email_as_string function: StringIO was not only used by email_as_string
* envelope: add a .eml suffix to the temp mailGonéri Le Bouder2013-11-12
| | | | Add a .eml extension to let $EDITOR known the file as a mail.
* Fix missing space in error messageStanislav Ochotnicky2013-10-30
|
* handle errors caused by trying to index mails...Patrick Totzke2013-07-07
| | | | | | ... not below notmuchs root path issue #611
* add 'unattach' command for envelope modePatrick Totzke2013-05-26
|
* changed repeatability default to False and reconsider repeatability of all ↵Sebastian Jeltsch2013-05-26
| | | | Commands
* Repeatability class property, mark more cmds as non-repeatableSebastian Jeltsch2013-05-26
|
* pep8/pyflakes fixesPatrick Totzke2013-03-16
|
* add missing help strings for crypto commandsPatrick Totzke2013-02-19
| | | | this fixes the auto-generation of the sphinx docs
* if :encrypt doesn't find any recipient set encrypt=FalseJohannes Kulick2013-02-19
|
* if key hint is ambiguous ask for key with choiceJohannes Kulick2013-02-19
|
* validate keys already in get_key()Johannes Kulick2013-02-19
| | | | | this way we don't have to call validate_key wherever we use get_key. And we would have to catch exceptions twice.
* add error codesJohannes Kulick2013-02-19
| | | | | to avoid import ui stuff to crypto.py I added error codes to the GPGProblem Exceptions. This way I can process them later, depending on the error code
* ignore empty strings for auto key lookupJohannes Kulick2013-02-19
|
* better error messagesJohannes Kulick2013-02-19
| | | | | also the error catchings are mostly moved to crypto.py whcih makes everything else a little bit cleaner
* validate key before adding to encryption listJohannes Kulick2013-02-19
| | | | | | | | | we check whether a key is - revoked - expired - invalid - unable to encrypt - unable to sign
* pep8 fixesPatrick Totzke2013-02-19
|
* handle more error codesJohannes Kulick2013-02-19
| | | | | sometimes if gpgme doesn't find a key it gives INVALID_VAL sometimes EOF, we now handle both