| Commit message (Collapse) | Author | Age |
|
|
|
| |
It has nothing whatsoever to do with the database.
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Avoid the child grabbing our stdin.
|
|
|
|
|
|
|
|
|
|
|
| |
Add a class that encapsulates the handler and is responsible for
managing the temporary file, if one is needed.
Use this class for both rendering inline content and displaying
attachments externally.
External attachments are now wrapped in an asyncio task that is added to
a pool of tasks managed by ui.
|
| |
|
|
|
|
|
| |
Use a contextlib.ExitStack to remove the temporary file used by external
handler, even if an exception is raised.
|
|
|
|
|
|
|
|
| |
Rename it to _render_part_external() and make it only handle external
rendering. Move the other code - dealing with text parts without an
external handler - to _MimeTree.render_str(). This takes into account
overridden content types, and also processes text/plain parts if that is
configured.
|
|
|
|
|
| |
Do not get it from the underlying EmailMessage, since we may override
it.
|
| |
|
|
|
|
| |
Same as what is done for Attachment.
|
| |
|
| |
|
|
|
|
|
| |
Allows computing message/thread counts asynchronously in a separate
thread.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Those are tags like attachment, signed, sent, etc., which are set
automatically based on message properties and are typically not changed
manually.
Such designated tags are not affected by the retag operation.
|
| |
|
|
|
|
|
| |
They are supposed to replace the original notmuch python bindings,
providing a safer and more pythonic interface.
|
|
|
|
| |
Remove the unused afterwards callback, make tags mandatory.
|
|
|
|
|
| |
This is not implemented in notmuch2 and does not really belong in alot.
It can be done better through the notmuch utility.
|
| |
|
| |
|
|
|
|
| |
message_list stores Messages themselves, not just their ids.
|
|
|
|
| |
The value is already a string.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of allowing the callers to access the email part directly,
introduce a new class for representing the MIME tree structure. All
interaction with the message content should now happen through this
class (some instances of direct access still remain and will be removed
later).
Encrypted/signed parts are now also handled through this structure
rather than using a fragile hack of attaching the decrypted message to
the encrypted one and using fake headers to signal
encryption/signatures.
Message body rendering is now done by walking through the whole MIME
tree and considering all the parts for rendering rather than picking one
specific part.
|
| |
|
|
|
|
|
|
| |
This also prevents it from modifying the message as it previously did
with add_tags. As a consequence, tags are now added to the beginning of
the message rather than at the end of header.
|
|
|
|
| |
Also, stop accessing the email directly.
|
|
|
|
| |
Avoid accessing the email directly.
|
|
|
|
| |
Drop some tests for removed functions.
|
| |
|
| |
|
|
|
|
|
|
|
| |
It has no relation to database, so helper seems like a better place for
it.
As there is nothing left in db/utils, it is removed.
|
| |
|
|
|
|
|
| |
They are only used in a single file, so there is no point in keeping
them elsewhere.
|
|
|
|
|
| |
It is only called from there, so there is no reason to keep it
elsewhere.
|
|
|
|
|
| |
It is only called from there, so there is no reason to keep it
elsewhere.
|
|
|
|
|
| |
It is used in only one place and does something so extremely simple it
does not need to be a special imported function.
|
|
|
|
|
|
|
|
| |
It is almost entirely unnecessary - python's email messages decode the
headers themselves. Do the "normalization" bit directly in the single
place where it is done, though properly there should be more thorough
message text sanitization somewhere (most likely in our message
wrapper).
|