summaryrefslogtreecommitdiff
path: root/alot
Commit message (Collapse)AuthorAge
* don't include quoted lines in msg content summaryPatrick Totzke2018-11-08
|
* crypto: use sphyinx 'raise' first param to give the typeRuben Pollan2018-11-01
|
* crypto: deal with bad signatures on session-decryptRuben Pollan2018-11-01
| | | | | | When the key is known or just the signature is invalid gpgme raises 'BadSignatures'. Up to now we were not acknoledging it when using session-keys, making impossible to open emails without the signing key.
* db/utils: strip cte before comparingDylan Baker2018-10-19
| | | | Fixes #1325
* Check set of encryption keys before sendingAndre Bianchi2018-10-16
| | | | Closes: #1232
* Merge pull request #1306 from lucc/fix-1303Dylan Baker2018-10-10
|\ | | | | Check the return code from sendmail
| * Improve error notification on failing sendmailLucas Hoffmann2018-10-10
| |
| * Check the return code from sendmailLucas Hoffmann2018-09-22
| |
* | crypto: Use session-key to decrypt messages if present in the indexRuben Pollan2018-10-08
| | | | | | | | | | | | | | | | | | | | 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.
* | Go back to Twisted event loopDylan Baker2018-10-04
| | | | | | | | | | | | | | | | | | | | Urwid + asyncio has been known to have very high CPU usage for 4 years now, and it hasn't been fixed. That basically makes it impossible to switch event loops. We can still get the asyncio syntax goodness but using the twisted asyncioreactor and then initializing urwid with the Twisted loop which doesn't have this problem. Fixes #1302
* | ui: Use Eventloop.create_future instead of asyncio.FutureDylan Baker2018-10-04
|/ | | | | This is recommended since other implementations can use this hook to return their own Future compatible implementations.
* Don't try to add Content-Disposition header to email that already has oneDylan Baker2018-08-13
| | | | | | | | | | | | | | | Currently in db.utils.extract_body we try to add a Content-Disposition header, regardless of whether an email already has one. This isn't actually legal, and individual mime message may only have one C-D. The correction is to replace the header with the modified header if it already exists, and to add a new one only if the message doesn't have one. Note that I haven't actually seen a message that hits the path that would need "add_header", only "replace_header". I have however included it because it would be a behavioral change to not handle that case. Fixes #1297
* commands/thread: Don't refresh after movingDylan Baker2018-08-08
| | | | | | | | | | For large threads (I can reproduce on threads with ~50 messages), changing messages can become quite slow, especially if there are a significant number of folded messages. Removing the call to refresh the body after moving seems to fix this. There may be side effects of this change, and it may be required in some cases, just not all of them.
* Set the policy for email.message_from_*Dylan Baker2018-08-06
| | | | | | | 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
* helper: remove unused GeneratorDylan Baker2018-08-06
|
* db/utils: remove unused Header importDylan Baker2018-08-06
|
* db/attachment: use set_param() instead of recreating a headerDylan Baker2018-08-04
| | | | This is more elegant and efficient way to handle this.
* db/utils: Replace encode_header with Message.add_headerDylan Baker2018-08-04
| | | | | Which appears to be capable of doing all the same things, but is in the stdlib instead of something we hand rolled.
* db: encode Header objects to strDylan Baker2018-08-04
| | | | | | | | | | | 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
* commands/globals: use getattr/setattr instead of manipulating __dict__Dylan Baker2018-08-02
| | | | Since that's what they're for.
* commands/globals: Convert CallCommand.apply to a coroutineDylan Baker2018-08-02
| | | | | | This allows it to easily wrap calls that are themselves coroutines, while it's still able to wrap synchronous calls. This fixes the async test and allows hooks that are coroutines to work.
* helper: replace email_as_* with email builtinsDylan Baker2018-08-02
| | | | | | | | | | | | | | 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
* remove workaround for python issuePatrick Totzke2018-08-02
| | | | that was solved upstream: https://bugs.python.org/issue14983
* db/manager: Append underscore to method named asyncJohannes Löthberg2018-08-01
| | | | | | | "async" is a reserved keyword in Python 3.7, so cannot be used for method names. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* ui: Drop unneeded _error_handler and rename _error_handler2Dylan Baker2018-07-26
| | | | | | The "2" version was used in non-twisted contexts, now that we don't use twisted we can drop this and rename the "2" variant to the normal variant.
* Drop all use of twisted!Dylan Baker2018-07-26
| | | | | This moves the actual event loop to be the default asyncio eventloop instead of the twisted reactor.
* ui: make apply_commandline a coroutineDylan Baker2018-07-26
| | | | | | This patch is sketchy, it makes the UI start up slowly, and it breaks in a bunch of cases where it get's defereds but asyncio doesn't expect that.
* ui: switch ui.prompt and ui.choice to use asyncio.FuturesDylan Baker2018-07-26
| | | | | | | | | | | asyncio's Futures are much like twisted's Deferreds, they represent a value that is not yet available, and they can be awaited like a coroutine. For the moment we still need to return a deferred because the twisted eventloop doesn't use Futures, it uses Deferreds; once we can remove twisted's eventloop we can remove the conversion from a Future to a deferred.
* ui: Convert apply_command to a coroutineDylan Baker2018-07-26
| | | | | | 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.
* ui: convert the loop_hook to asyncioDylan Baker2018-07-26
| | | | | | asyncio doesn't have a loopingCall helper, so I've implemented a coroutine that does the same thing, it takes a callable, a period, and then forwards all other arguments. This is tested and working.
* command/envelope: Don't use a deferred, use awaitDylan Baker2018-07-26
|
* account: Convert send_mail function to coroutineDylan Baker2018-07-26
|
* helper: use asyncio.subprocess instead of twistedDylan Baker2018-07-26
|
* db/manager: use threads instead of reactor.callInThreadDylan Baker2018-07-26
| | | | | This is the obvious thing to do, and it works, but it does introduce some latency into starting alot.
* buffers/search: add missing NotmuchErrorDylan Baker2018-07-26
| | | | Found due to another bug :)
* commands/globals: implement ExternalCommand.apply as coroutineDylan Baker2018-07-26
| | | | | | Rather than returning a deferred in some cases, this makes the function a coroutine, in some cases it calls regular subprocess, in other cases it uses asyncio subprocess.
* commands/thread: Use asyncio coroutines instead of twisted deferredsDylan Baker2018-07-26
|
* commands/globals: Use asyncio coroutines instead of twisted deferredsDylan Baker2018-07-26
|
* command/envelope: use asyncio coroutines instead of twisted inlineCallbacksDylan Baker2018-07-26
|
* ui: Handle asyncio coroutines in call_cmdDylan Baker2018-07-26
| | | | | | This allows twisted deferred's (which is all an inlineCallback actually is) to be mixed with asyncio coroutines (async def), by wrapping them in a special twisted function for handling asyncio coroutines.
* Use twisted reactor as asyncio event loopDylan Baker2018-07-26
| | | | | | | | This puts the twisted event loop into the asyncio framework. This means that we're currently running all over our twisted.defered's and twisted.inlineCallbacks through asyncio, using the twisted loop. This will allow incremental updates from twisted's event loop to a standard asyncio event loop.
* commands/envelope: check that self.envelope is not NoneDylan Baker2018-07-26
| | | | | | 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.
* Merge pull request #1276 from alexshpilkin/copyeditDylan Baker2018-07-25
|\ | | | | Copyedit documentation
| * Describe options the same way in help and manualAlexander Shpilkin2018-07-25
| | | | | | | | | | The descriptions of --help and --version are the same as used in e.g. GNU coreutils (different from the Python default).
| * Reword description of options -C and colourmodeAlexander Shpilkin2018-07-25
| |
| * Avoid abbreviations in documentationAlexander Shpilkin2018-07-25
| |
| * Capitalize option and command descriptions consistentlyAlexander Shpilkin2018-07-25
| |
| * Fix typo in description of option -dAlexander Shpilkin2018-07-25
| |
* | commands/globals: Convert Address to string for email.utilsDylan Baker2018-07-25
|/ | | | | | | | Email utils apparently assumes it's getting a string, and calls encode directly. This can only be hit if you have a single account configured, not with multiple accounts. Fixes #1277
* Merge pull request #1256 from pazz/namedqueriesDylan Baker2018-07-24
|\ | | | | New buffer type for notmuch's named query strings