| Commit message (Collapse) | Author | Age |
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
As far as I can tell using a separate process doesn't actually improve
performance, it makes it worse. The work that we're passing off to the
separate function isn't necessarily work that's well suited to being
handed off, there isn't a lot of computation and the objects that need
to be passed across the pipe are fairly large (at least when considering
a pipe). Converting the function to a generator gives better performance
and simplifies the implementation.
|
|
|
|
|
| |
This is not implemented in notmuch2 and does not really belong in alot.
It can be done better through the notmuch utility.
|
|
|
|
| |
Drop some tests for removed functions.
|
| |
|
| |
|
|
|
|
| |
Drop useless db/thread test.
|
|
|
|
|
| |
It should be cleaner and easier to use, and eventually replace the
custom tree walker in the thread display buffer.
|
|
|
|
| |
It should always be instantiated from a Thread instance.
|
| |
|
|
|
|
| |
This reverts commit e7e0c52db9093a9ecd9dcaa0766e66515a546a75.
|
|
|
|
|
| |
Fixes an issue introduced in 45829f7956716638fe77989a50eb87d3ea34cace
which made header values containing ':' break the parser.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
"Prefer plain text" should mean just that, and not "ignore HTML even in
the absence of a text part".
21c399ee ("Update to new (3.6) email message API", 2018-12-08) had
introduced the "ignore" behaviour. Make it "prefer" again.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
As far as I can tell using a separate process doesn't actually improve
performance, it makes it worse. The work that we're passing off to the
separate function isn't necessarily work that's well suited to being
handed off, there isn't a lot of computation and the objects that need
to be passed across the pipe are fairly large (at least when considering
a pipe). Converting the function to a generator gives better performance
and simplifies the implementation.
|
|
|
|
| |
It was added to the stdlib in py3.3 and we already require 3.5.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
176cffcd ("refactor alot.db.utils.remove_cte", 2018-12-04) created a few
problems with 8bit quoted-printable e-mails, see #1291 #1360.
This commit restores the old libmagic fallback which did not cause this
problem.
|
|
|
|
|
|
|
|
| |
The two main reasons are
- to run `python3 -m unittest discover` without specifying a custom
`--pattern *_test.py`
- to include the test files automatically when generating the MANIFEST
file.
|
| |
|
|
|
|
|
|
| |
this is now test_char_vs_cte_mismatch;
It checks if a mime part contains a character which is not encoded in
the encoding declared in the Content-Transfer-Encoding header
|
|
|
|
|
| |
that tests if a message with unknown content-transfer-encoding header,
but otherwise correct ascii encoded payload, is warned about.
|
|
|
|
|
| |
It now tests if malformed Content-Transfer-Encoding values are reported
in the logs
|
| |
|
|
|
|
|
|
| |
This adds a test for detecting a malformed content-transfer-encoding
(trailing semi-colon).
It also changes the raised exception to the more appropriate ValueError.
|
|
|
|
| |
This does just call the final bit of code that throws the exception.
|
|
|
|
|
|
|
|
|
|
| |
notmuch caches the OpenPGP session keys if configured to do so. See
index.decrypt on:
https://notmuchmail.org/manpages/notmuch-config-1/
Using the cached session key decryption of messages can be done without
the need of having the private OpenPGP key. There is some speed up on
decryption, mostly notable on long encrypted threads.
|
|
|
|
|
| |
Which appears to be capable of doing all the same things, but is in the
stdlib instead of something we hand rolled.
|
|
|
|
|
|
|
|
|
|
|
| |
In python 3 with the use of Policy objects (other than the Compat32
object which maintains the previous (python 2.x and <=3.2) API) change
the way headers work, and the old Header object is no longer used. This
is rather convenient in that python now implements many of the rules
required for sepcial header types, but it changes the API. This fixes
that by encoding the Header objects to strings.
Fixes #1289
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 adds a new TestCase for the database manager
and adds a test for saving/reading named query strings to the database.
|
|
|
|
|
|
|
|
|
|
| |
Our message_from_functions decrypt PGP encryped parts in addition to
creating a message object (from bytes or file handles) and recognizing
the encoding in one way or the other.
Rename them before refactoring to make their function clearer and to
distinguish them from the email.message_from_ functions (which do not
decrypt).
|
|
|
|
| |
They are not needed for python >= 3.0.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
I had made the assumption early on that this would get bytes, but when I
added `assert isinstance(header, bytes)` alot would crash on startup,
changing `bytes` to `str` fixed that. I noticed this when trying to fix
the warning generated in the logging call.
|
| |
|
|
|
|
|
| |
There are a few that are still broken because of bytes to unicode
conversion, and this may not all be correct, but most of the tests pass
|