| Commit message (Collapse) | Author | Age |
|\
| |
| | |
py3k small fixes
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
This wasn't caught by static checkers since it is used in the other
brach of the if statement containing this value.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
mark old options for encrypt_by_default as deprecated
|
| |/
| |
| |
| | |
Mark all values for [account]encrypt_by_default as deprecated
|
|\ \
| | |
| | | |
Simplify for loop and string building
|
| |/ |
|
| | |
|
|/ |
|
|\
| |
| | |
Load default settings even if a user config doesn't exist
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| | |
SettingsManager sets it's _config attribute to the exact same value
twice in the constructor. This is wrong.
|
|\ \
| | |
| | | |
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.
|
| |/
| |
| |
| |
| | |
This allows to simply pass the content of a messages' From-header value
when determining an account to send/save/encrypt from.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>".
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
| |
In python 3 email.Utils doesn't exist, in python 2.7 both do, but Utils
is deprecated.
|
|
|
|
|
| |
This splits the loop into a closure and a call to any, which makes it a
little bit easier to read and understand.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
Fix issue 1113
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
| |
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.
|
|\
| |
| | |
Add `move next matching` command in thread buffer
|
| |
| |
| |
| |
| | |
If the querystring did contain an OR the results where misleading as the
AND binds stronger.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|\
| |
| | |
docs: mention 'content' part in threadline theming
|
| |
| |
| |
| |
| | |
... which displays a prefix of the msg contents.
This feature was missing in the docs.
|
| |
| |
| |
| |
| |
| |
| | |
This can create circular imports in unittests, which causes difficult to
debug errors.
Fixes #1076
|
|/
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
commands/envelope: Fall back to account for signing key
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
|/| |
settings: Allow loading themes from system locations
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|