| Commit message (Collapse) | Author | Age |
|\
| |
| | |
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.
|
|\ \
| | |
| | | |
helper: Do not add a newline to the end of a signed section
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The spec is very clear here:
(2) An appropriate Content-Transfer-Encoding is then applied; see
section 3. In particular, line endings in the encoded data
MUST use the canonical <CR><LF> sequence where appropriate
(note that the canonical line ending may or may not be present
on the last line of encoded data and MUST NOT be included in
the signature if absent).
That very last MUST NOT is what's important here, we shouldn't be adding
newlines if they weren't there to begin with. Because we do it causes
signed blobs that have newlines to be invalid since we've changed the
substance of the signed code.
|
|/
|
|
|
|
|
| |
One is an abstract method anyways and the other one is trivial. It just
calls two other functions that are already covered by tests.
This results in 100% test coverage for alot/addressbook/*.
|
|
|
|
|
|
|
|
|
| |
There are currently several problems with this docstring:
1) it says the return type is list, but it's actually an iterator
2) it says the first parameter is keyid, but it's hint
3) no types are specified.
This patch corrects that.
|
|
|
|
|
|
|
|
|
|
| |
This is a just a small refactor that makes things a little more
readable, and provides slightly more verbose messages in for signing and
encrypting failures.
Mainly this uses str.format instead of inline concatenation, but it also
rewraps and removes '+' operators from a string already wrapped in
parens
|
|
|
|
|
|
|
|
|
| |
To verify the signature correctly we need to ensure that the body of the
message is decoded the same way as it was when it was signed,
specifically using helper.email_as_string to insert \r\n instead of
.as_string, which only inserts \n.
Fixes #1079
|
|
|
|
|
|
|
|
|
|
| |
gpgme.Context.verify doesn't raise an exception, instead it attaches the
error as an attribute of the return value. This means that we've been
returning that a signature is valid even when it isn't.
This patch checks the attribute instead of try/excepting. Because there
is a second bug (fixed in the next patch) signature verification will
always fail with this patch.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This command allows the configuration to be reloaded while alot is
running.
Fixes #1046
|
|
|
|
|
|
|
|
|
|
|
| |
This patch does a bit of refactoring to the Settings class for it's
setup, and adds a reload method. The refactoring encapsulates the
handling of NoneType for the read_*config methods, and reworks the
constructor just a bit so that it doesn't rely on calling methods to
create instance variables.
The end result is slightly cleaner, and will be useful for adding a
reload command to alot itself.
|
| |
|
|
|
|
|
| |
The protected code only calls re.match and list.append so it should
never fail (and if it still fails it should not be silenced).
|
|
|
|
|
|
|
| |
Instead of manual parsing with regexp and manual string formatting the
functions from email.utils are used. This fixes some small
inconsistencies with addresses with empty realnames and with commas in
realnames.
|
| |
|
|
|
|
|
|
|
|
| |
This fixes a bug in determine_sender where an account that did match but
did not have a realname set was "not found" in case force_realname was
set.
Helped-By: Pol Van Aubel <dev@polvanaubel.com>
|
|
|
|
|
| |
Otherwise the next account in the for loop might have been returned if
the account was found to match with its last alias.
|
| |
|
| |
|
| |
|
|
|
|
| |
via cached properties
|
|\
| |
| | |
tests for addressbook classes
|
| | |
|
|/
|
|
|
|
| |
Fixes #707 and #332.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
|
|\
| |
| | |
add some first tests for settings.manager.SettingsManager
|
| |
| |
| |
| |
| | |
The argument is handed to ConfigObj directly and allowing lines of text
to be passed here makes future tests much easier.
|
|/
|
|
|
|
| |
Currently this code works because alot always populates aliases so it's
not None, but if for some reason it doesn't then get_addresses will
assert.
|
| |
|
|\
| |
| | |
fix #1036
|
| |
| |
| |
| |
| | |
This prevents the threadbuffer to look up a nonexistent focussed message
if the thread is empty (e.g. after removal of the last msg).
|
| |
| |
| |
| | |
This reverts commit 488d843082600928902cf4cbd442f1545a0a8c59.
|
| |
| |
| |
| | |
This reverts commit 237499e631741dbb3837e5ef99cc66f842e8a92e.
|
| | |
|