summaryrefslogtreecommitdiff
path: root/worker
AgeCommit message (Collapse)Author
2020-05-26notmuch: undefined variable when setting reply flagSrivathsan Murali
2020-05-25Set AnsweredFlag on successful replySrivathsan Murali
2020-05-16imap: Remove FetchMessageBodyPart.{Encoding,Charset}Reto Brunner
Fixes https://todo.sr.ht/~sircmpwn/aerc2/352 exactly as suggested by emersion.
2020-05-11maildir: remove read handling from FetchMessageBodyPartReto Brunner
2020-05-11notmuch: remove read handling from FetchMessageBodyPartReto Brunner
2020-05-06Guess date from received if not presentelumbella
2020-05-05Allow maildir subdirectoriesGrégoire Delattre
2020-05-01store.FetchFull: Change callback type to expose entire messageBen Fiedler
This is a prerequisite for allowing the FetchFull message to return both the message content and the message headers.
2020-04-24imap/fetch.go: report error when fetching headers failsBen Fiedler
Correct me if I'm wrong, but shouldn't this raise an error when it fails?
2020-03-09Count recent messages in maildir exists total tooJeffas
2020-03-09Ignore missing message part in getDecodedPartAmir Yalon
The code that calls this function handles nil without issues.
2020-03-03Initial support for PGP decryption & signaturesDrew DeVault
2020-03-03worker/imap: rely on go-imap for charset handlingSimon Ser
Set imap.CharsetReader so that go-imap can automatically decode all encoded fields.
2020-03-03Mark sent messages as "seen" in maildirGalen Abell
- Add maildir flags to complement a messages imap flags - Set the "seen" flag on sent messages when using the maildir backend - Cleanup AppendMessage interface to use models.Flag for both IMAP and maildir
2020-03-01notmuch: emit dirinfo upon label changeReto Brunner
2020-02-29remove the dirInfoUpdateRequest functionalityReto Brunner
The notmuch worker followed suit in handling the dirInfo submission manually. That removes the last user so we might as well remove the functionality.
2020-02-29notmuch: align dirInfo logic to the maildir workerReto Brunner
2020-02-28Cleanup sorting logicJeffas
There was an unused error value as well as unnecessary usage of the sort interface. There should now be less copying so a bit better performance in some cases.
2020-02-28Update DirectoryInfo handling for maildirJeffas
This ensures that the directory info is up to date on events in the maildir worker. This also sets up the initial dirinfo for other directories and updates them when using built-in commands. FS events are still only watched for the selected directory. This should be changed in a future patch to watch other directories too in order to cover UI updates for folders when an event occurs in a non-selected folder.
2020-02-26Make search more lenientJeffas
When we fail to read a single message we don't need to fail the whole search, just log the error and we can still get results back.
2020-02-26Add missing notmuch build tagsJeffas
2020-02-25Ensure new directory exists before unwatching oldGalen Abell
2020-02-25lib/msgstore: debounce directoryUpdateRequestsReto Brunner
Apparently sending an event for every incoming messageInfo slows down the application significantly. Therefore this slows down the emmision rate, on the cost of being out of date in some cases.
2020-02-16notmuch: refresh dirlist in backgroundReto Brunner
2020-02-16notmuch: add internal event loopReto Brunner
2020-02-16notmuch: emit DirInfo upon requestReto Brunner
2020-02-16Request DirInfo whenever the unread count may have changedReto Brunner
Actions such as read / unread or the addition of new messages do change the read/unread/recent count. Hence we request an update from the workers. Workers going over the network should probably cache the information and invalidate it only if necessary
2020-02-16imap: fix double closing idleStopReto Brunner
The idle restart code is at the end of handleMessage in the worker. However if an unsupported msg comes in, we returned early, skipping the re-init. That lead to a crash due to double closing idleStop in the next iteration.
2020-02-16notmuch: avoid stale DBsReto Brunner
Opening a notmuch DB gives you a snapshot of the stage at that specific time. Prior to this, we only reopened the DB upon writing. However, if say a mail sync program like offlineimap is fetching new mail, we would never pick it up. This commit caches a db for a while, so that we don't generate too much overhead and does a reconnect cycle after that. I hardcoded a value as I don't think that having an option would be beneficial. Any write operation (meaning reading mail) anyhow flushes the DB by necessity. (we need to close to commit tag changes, which changing the read state is)
2020-02-06worker/lib/parse: be more tolerant with parsing email addressesTimmy Douglas
2020-01-24imap: emit messageinfo when changing read state.Reto Brunner
We need to emit the changed msgInfo whenever we modify the state
2020-01-18worker/imap: don't decode in FetchFullMessage.Reto Brunner
Doing that breaks `git am` as it expected the encoded variant. Same is probably true for any sort of signature validation (gpg / dkim)
2020-01-05maildir/notmuch: don't re-encode readersReto Brunner
2020-01-05imap: decode reader prior to returning themReto Brunner
2020-01-05FetchBodyParts: decode source in the workersReto Brunner
Previously the workers returned a mixture of decoded / encoded parts. This lead to a whole bunch of issues. This commit changes the msgviewer and the commands to assume parts to already be decoded
2019-12-27Add labels to index format (%g)Reto Brunner
Exposes the notmuch tags accordingly, stubs it for the maildir worker.
2019-12-21notmuch: emit LabelList eventReto Brunner
2019-12-21add LabelList eventReto Brunner
2019-12-07decode(RFC 2047) imap headers to fix encoding in subject & filenamesLeszek Cimała
Me again, this time fixing encoding of subjects and attachments. It was problem in IMAP backend. While other backends user MessageInfo() function which generates MessageInfo decoded via go-message methodes, IMAP worker is creating MessageInfo directly, so all non-utf8 subjects and filenames were in raw form. This patch fixes it. Not sure if we should care about errors (if DecodeHeader fails it returns raw string back). >From what I see, this should solve all encoding problem (tested only IMAP). So, now I can focus on features. ;-) Have a great weekend! Leszek
2019-11-17Parse Reply-To header while parsing envelopeSrivathsan Murali
2019-11-10worker/imap: Fix seqMap race conditionKevin Kuehler
When deleting a message, sometimes FetchDirectoryContents will fire. FetchDirectoryContents will return a smaller set of UIDs since messages have been deleted. This operation races with fetching from the seqMap in client.ExpungeUpdate. Only recreate the seqMap if it can grow so that messages will continue to be expunged. Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
2019-11-01Notmuch: be resilient to config errorsReto Brunner
Right now notmuch panics if something goes wrong in the configure event. This patch checks for that and returns an error instead, so that we can at least get the UI up and running (and all the other accounts) The experience will be completely degraded until another configure event occurs.
2019-11-01notmuch: ignore comments and blank lines when processing query-map fileMatt Snider
A segmentation fault occurs when using the notmuch backend and a `query-map` file that contains blank lines or comments.
2019-10-16Fix: oauthbearer runtime errorFrode Aannevik
Configure an oauthbearer source without a token_endpoint parameter would panic due to nil pointer dereference Example source=imaps+oauthbearer://frode.aa%40gmail.com@imap.gmail.com:993 source-cred-cmd=pass oatuh2 frode.aa@gmail.com token_endpoint is not required as it will use the provided password as access_token when it is not set
2019-09-20Change search flagsJeffas
This changes the search flags for maildir and imap backends. They now no longer use -t for searching all text. This seems to make more sense as being the targeted recipient. I have similarly added Cc for -c. The text search now resides under -a for all text.
2019-09-20notmuch: add sort functionalityReto Brunner
2019-09-20Add sorting functionalityJeffas
There is a command and config option. The criteria are a list of the sort criterion and each can be individually reversed. This only includes support for sorting in the maildir backend currently. The other backends are not supported in this patch.
2019-09-18Add directory info messagesJeffas
This populates the directory info model properly when requested, allowing the fields to be relied upon elsewhere. This also sends the dirinfo when new messages come in.
2019-09-16Add basic searching to the maildir backendJeffas
Basic searching is supported with the following: - read messages - unread messages - from addresses - text in body - text in subject - text in all The implementation loops through all messages in the selected directory. It tries to be smart by detecting which parts of each message the search query needs to use and only loads these from the filesystem.
2019-09-16notmuch: implement ModifyLabelsReto Brunner