| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
| |
Split the code into its own function.
Make it properly case-insensitive.
Apply either the blacklist or the whitelist setting, trying to apply
both makes no sense.
Enforce that either a blacklist or a whitelist is configured in the
settings.
|
|
|
|
| |
Handle multiple headers with ordering and case-insensitive operations.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Make it a plain container around raw data and a few bits of metadata,
rather than around a whole MIME part.
|
|
|
|
| |
It has nothing to do with the database.
|
|
|
|
|
|
|
|
|
|
| |
email.mime is a part of the old API, which does not mix well with the
new one (i.e. when email.policy.SMTP is used), specifically when
non-ASCII headers are used.
Additionally, clean the APIs that accept either EmailMessage or a str to
only expect EmailMessage. Supporting both just adds confusion and
complexity.
|
| |
|
|
|
|
| |
It is only used inside one function.
|
| |
|
|
|
|
|
|
|
| |
It does not actually save any code. The new code also uses a shell as is
documented.
Remove call_cmd_async(), as it no longer has any callers.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
It just adds unnecessary type confusion.
In most places where it is used, the types are always str, so it does
nothing. In the few others, the encoding/decoding is better handled
explicitly.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Do not recreate all the widgets on every update, just update the widget
contents.
Make the statusbar update async, since some calls to get_info() can take
a long time (especially noticeable for counting threads for searches
with many results).
|
|
|
|
|
| |
Fixes https://github.com/pazz/alot/issues/1435:
Do not add a Date header if it is already present
|
|
|
|
|
|
|
|
|
|
|
| |
Use the ordered set of header keys from the settings or from the current
envelope when generating an editable envelope.
Fixes https://github.com/pazz/alot/issues/898:
Message header ordering isn't preserved from the editor
Note: collections.OrderedDict has been used for backward compatibility with
Python <3.7.
|
| |
|
| |
|
|
|
|
|
| |
... since accounts' addresses can overlap and get_account_by_address
promises too much. Also remove now-obsolete get_addresses.
|
|
|
|
| |
simplifies a few tests, fixes #1177
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bounce correctly determines the address and account to send the bounce
from. It uses the account to choose an address book for "to:" completion
and passes the sender address as "Resent-From:" to SendCommand(). The
latter uses the "From:" header, though, to determine the sending account
again and (in the case of a bounce) wrongly.
Make SendCommand() use "Resent-From:" if present and "From:" else.
Code remark: specifying "False" as the default return value for get()
ist not necessary; it is meant to make this short form clearer to read,
and to safeguard for times when '' or None do not evaluate to False
here.
|
|
|
|
| |
Closes: #1232
|
|
|
|
|
|
|
| |
Otherwise they default to the Compat32 policy, which isn't want we want,
since we end up with a mixture of new and old types.
Fixes: #1292
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python 3.3 added a new feature to the email module, policies
(https://docs.python.org/3.5/library/email.policy.html). Policy objects
allow precise control over how numerous features work when converting to
and from str or bytes. With the `email.policy.SMTP` the behavior of
email_as_bytes and email_as_string can be achieved using the builtin
`.as_string()` and `.as_bytes()` methods, without custom code or the
need to test it. Additionally these methods handle corner cases that we
don't currently handle, such as multi-part messages with different
encodings.
Fixes #1257
|
|
|
|
|
|
| |
This is a pretty invasive patch, since the ui code is used so
extensively, it requires going into a lot of other code and converting
those to coroutines, since before they returned deferred's.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
If the mail is passed a string then envelope will always be None. There
is one case in the final callback where self.envelope is assumed set,
but it isn't guaranteed to be, so guard that properly.
|
| |
|
|
|
|
|
|
|
| |
This prevents the update of the gpg keys stored in an envelope,
triggered by a header change, in case envelope.encrypt is set to false.
Fixes the issue that I reported on #1228
|
| |
|
|\
| |
| | |
envelope: Update encryption keys when CC, To, or From is changed
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently the encryption keys will only be updated when they are
toggled, which means that if you change a Cc or To then the keys
encrypted to might be wrong, either too many keys will be encrypted to,
or not enough, or just the wrong ones.
This patches fixes this by calling set_encrypt whenever the 'To', 'Cc',
or 'From' headers are changed by set or unset.
Fixes #1227
|
| |
| |
| |
| | |
They are not needed for python >= 3.0.
|
|\|
| |
| |
| |
| | |
This requires regenerating the accounts_table docs, as they've changed
for python 3.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
maildir knows R and P flags which denote messages that have been replied
to resp. passed on (fowarded, bounced). They correspond to IMAP flags
\Replied and $Forwarded which are used by many clients and by
synchronisation software. E.g., mbsync syncs \Replied to R, a patch for
P is pending.
Implement replied_tags and passed_tags for alot which work similar to
sent_tags: sent_tags tags the sent message; replied_tags (resp.
passed_tags) tags the message being replied to (resp. being fowarded).
Basically, setting the replied_tags config to `replied` and replying to
a message has the same effect as doing `tag replied; reply`, but the
latter would tag even sending the reply is aborted or fails. The
implementation in this patch makes sure that the tagging is done only if
and when the reply resp. forward has been sent successfully.
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
This mostly shortens lines down to <=79 chars and fixes some other small
things I found using the pep8 tool.
|
|/ |
|
|
|
|
|
|
| |
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.
|