| Commit message (Collapse) | Author | Age |
... | |
|\
| |
| | |
Fix issue with account selection
|
| |
| |
| |
| |
| |
| | |
instead of assuming that it already receives a string. The new
behaviour is in sync with the type documented for the superclass
`Account`.
|
| |
| |
| |
| |
| | |
.. as read from the From-header directly, potentially including realname
parts.
|
|/
|
|
|
| |
In python 3 email.Utils doesn't exist, in python 2.7 both do, but Utils
is deprecated.
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This can create circular imports in unittests, which causes difficult to
debug errors.
Fixes #1076
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This module is going to be enhanced with additional components in later
patches in this series, so it needs a more generic name.
|
| |
|
| |
|
|
|
|
| |
This is just whitespace changes.
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
| |
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())``.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
- use relative imports if possible
- group imports into standard library, third party, and alot modules
- sort imports alphabetically
|
| |
|
|
|
|
|
| |
`del` and `return` are keywords and not functions so the braces are not
needed.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Add a .eml extension to let $EDITOR known the file as a mail.
|
| |
|
|
|
|
|
|
| |
... not below notmuchs root path
issue #611
|
| |
|
|
|
|
| |
Commands
|
| |
|
| |
|
|
|
|
| |
this fixes the auto-generation of the sphinx docs
|
| |
|
| |
|
|
|
|
|
| |
this way we don't have to call validate_key wherever we use get_key. And we
would have to catch exceptions twice.
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
also the error catchings are mostly moved to crypto.py whcih makes everything
else a little bit cleaner
|
|
|
|
|
|
|
|
|
| |
we check whether a key is
- revoked
- expired
- invalid
- unable to encrypt
- unable to sign
|
| |
|
|
|
|
|
| |
sometimes if gpgme doesn't find a key it gives INVALID_VAL sometimes EOF, we now
handle both
|