aboutsummaryrefslogtreecommitdiffstats
path: root/worker
Commit message (Collapse)AuthorAgeFilesLines
...
* notmuch: manually close notmuch objectsReto Brunner2020-08-071-0/+3
| | | | | There seems to be some race with the automatic closing that should happen in theory... close it manually where we can to avoid the issue
* maildir: Provide nicer error message on invalid urlTero Koskinen2020-07-272-4/+34
| | | | | | | | If accounts.conf contains an invalid maildir url, return a nice error instead of panicking. Log a couple of different error cases to provide extra information about the error to the user.
* Remove hard coded bodystruct path everywhereReto Brunner2020-07-272-7/+11
| | | | | | | Aerc usually used the path []int{1} if it didn't know what the proper path is. However this only works for multipart messages and breaks if it isn't one. This patch removes all the hard coding and extracts the necessary helpers to lib.
* Add flag based search optionsTobias Wölfel2020-07-252-2/+42
| | | | | | | Provide search and filter with the option to specify more flag based conditions. Use '-x <flag>' to search for messages with a flag (seen, answered, flagged) and '-X <flag>' to search for messages without a flag.
* Only send directory info once from maildirAndrew Jeffery2020-07-191-4/+5
| | | | | The directory info only needs to be sent once for all the messages, this reduces unnecessary messages being sent which could lock up the ui.
* run go fmtReto Brunner2020-07-171-2/+2
|
* Make it easier to debug date parsing errorsLyudmil Angelov2020-07-111-1/+1
| | | | | | | | | When message dates failed to parse, the error displayed would try to include the time object it failed to obtain, which would display as something like 0001-01-01 00:00:00 UTC, which isn't of much help. Instead, display the text we were trying to parse into a date, which makes the problem easier to debug.
* Add additional flagging functionalityARaspiK2020-07-087-91/+76
| | | | | | | | | | | | | | More mail flags can now be set, unset, and toggled, not just the read/seen flag. This functionality is implemented with a new `:flag` and `:unflag` command, which are extensions to the matching `:read` and `:unread` commands, adding support for different flags. In fact, the `read`/`unread` commands are now recognized aliases to `flag`/`unflag`. The new commands are also well documented in aerc(1). The change mostly extends the previous read/unread setting functionality by adding a selection for the flag to change.
* notmuch: fix docstringReto Brunner2020-07-081-1/+1
|
* notmuch: handle the answered flagReto Brunner2020-07-051-0/+2
|
* notmuch: undefined variable when setting reply flagSrivathsan Murali2020-05-261-1/+1
|
* Set AnsweredFlag on successful replySrivathsan Murali2020-05-257-0/+155
|
* imap: Remove FetchMessageBodyPart.{Encoding,Charset}Reto Brunner2020-05-162-110/+109
| | | | Fixes https://todo.sr.ht/~sircmpwn/aerc2/352 exactly as suggested by emersion.
* maildir: remove read handling from FetchMessageBodyPartReto Brunner2020-05-111-21/+0
|
* notmuch: remove read handling from FetchMessageBodyPartReto Brunner2020-05-111-13/+0
|
* Guess date from received if not presentelumbella2020-05-061-1/+41
|
* Allow maildir subdirectoriesGrégoire Delattre2020-05-051-11/+27
|
* store.FetchFull: Change callback type to expose entire messageBen Fiedler2020-05-011-0/+1
| | | | | This is a prerequisite for allowing the FetchFull message to return both the message content and the message headers.
* imap/fetch.go: report error when fetching headers failsBen Fiedler2020-04-241-3/+4
| | | | | Correct me if I'm wrong, but shouldn't this raise an error when it fails?
* Count recent messages in maildir exists total tooJeffas2020-03-091-1/+1
|
* Ignore missing message part in getDecodedPartAmir Yalon2020-03-091-1/+1
| | | | The code that calls this function handles nil without issues.
* Initial support for PGP decryption & signaturesDrew DeVault2020-03-031-3/+3
|
* worker/imap: rely on go-imap for charset handlingSimon Ser2020-03-031-31/+13
| | | | | Set imap.CharsetReader so that go-imap can automatically decode all encoded fields.
* Mark sent messages as "seen" in maildirGalen Abell2020-03-037-18/+56
| | | | | | | - 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
* notmuch: emit dirinfo upon label changeReto Brunner2020-03-011-0/+3
|
* remove the dirInfoUpdateRequest functionalityReto Brunner2020-02-292-9/+0
| | | | | The notmuch worker followed suit in handling the dirInfo submission manually. That removes the last user so we might as well remove the functionality.
* notmuch: align dirInfo logic to the maildir workerReto Brunner2020-02-291-10/+13
|
* Cleanup sorting logicJeffas2020-02-281-155/+55
| | | | | | 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.
* Update DirectoryInfo handling for maildirJeffas2020-02-281-6/+50
| | | | | | | | | | | 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.
* Make search more lenientJeffas2020-02-261-1/+2
| | | | | 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.
* Add missing notmuch build tagsJeffas2020-02-262-0/+4
|
* Ensure new directory exists before unwatching oldGalen Abell2020-02-251-5/+6
|
* lib/msgstore: debounce directoryUpdateRequestsReto Brunner2020-02-251-0/+2
| | | | | | | | 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.
* notmuch: refresh dirlist in backgroundReto Brunner2020-02-163-1/+27
|
* notmuch: add internal event loopReto Brunner2020-02-163-12/+38
|
* notmuch: emit DirInfo upon requestReto Brunner2020-02-161-12/+44
|
* Request DirInfo whenever the unread count may have changedReto Brunner2020-02-161-0/+7
| | | | | | | 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
* imap: fix double closing idleStopReto Brunner2020-02-161-2/+4
| | | | | | 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.
* notmuch: avoid stale DBsReto Brunner2020-02-161-99/+133
| | | | | | | | | | | | | | 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)
* worker/lib/parse: be more tolerant with parsing email addressesTimmy Douglas2020-02-061-1/+1
|
* imap: emit messageinfo when changing read state.Reto Brunner2020-01-241-2/+17
| | | | We need to emit the changed msgInfo whenever we modify the state
* worker/imap: don't decode in FetchFullMessage.Reto Brunner2020-01-181-27/+2
| | | | | Doing that breaks `git am` as it expected the encoded variant. Same is probably true for any sort of signature validation (gpg / dkim)
* maildir/notmuch: don't re-encode readersReto Brunner2020-01-051-37/+4
|
* imap: decode reader prior to returning themReto Brunner2020-01-051-10/+90
|
* FetchBodyParts: decode source in the workersReto Brunner2020-01-051-2/+4
| | | | | | | 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
* Add labels to index format (%g)Reto Brunner2019-12-273-0/+14
| | | | Exposes the notmuch tags accordingly, stubs it for the maildir worker.
* notmuch: emit LabelList eventReto Brunner2019-12-212-0/+29
|
* add LabelList eventReto Brunner2019-12-211-0/+5
|
* decode(RFC 2047) imap headers to fix encoding in subject & filenamesLeszek Cimała2019-12-071-5/+25
| | | | | | | | | | | | | | | | | | 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
* Parse Reply-To header while parsing envelopeSrivathsan Murali2019-11-171-0/+5
|