aboutsummaryrefslogtreecommitdiffstats
path: root/worker/imap
Commit message (Collapse)AuthorAgeFilesLines
* remove the dirInfoUpdateRequest functionalityReto Brunner2020-02-291-2/+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.
* 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.
* 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.
* 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)
* imap: decode reader prior to returning themReto Brunner2020-01-051-10/+90
|
* 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
* worker/imap: Fix seqMap race conditionKevin Kuehler2019-11-101-1/+3
| | | | | | | | | | 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>
* Fix: oauthbearer runtime errorFrode Aannevik2019-10-161-6/+7
| | | | | | | | | | | | 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
* Change search flagsJeffas2019-09-201-2/+6
| | | | | | | | 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.
* Add new search behaviour for imapJeffas2019-09-111-4/+19
| | | | | | This patch adds search behaviour to allow searching in the body of the messages, the entire text (body + header), and searching just the from header.
* extract search criteria parsing into the backendsReto Brunner2019-08-292-8/+49
|
* imap worker: do not copy mailbox status mutexWagner Riffel2019-08-261-2/+3
| | | | Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
* Don't print imap errors to uiJelle Besseling2019-08-081-0/+1
| | | | | | | | This fixes ~sircmpwn/aerc2#245. This sets up the imap client to send error messages to the logger of the worker. Errors now end up in the bottom status line. https://todo.sr.ht/~sircmpwn/aerc2/245
* Register worker in init.Reto Brunner2019-07-191-2/+8
| | | | | This allows backends which can't always be compiled due to missing dependencies (say libnotmuch) to be compiled conditionally with buildflags.
* #190 Handle gmail duplicate folderDaniel Bridges2019-07-111-4/+1
|
* Support imaps with oauthbearer authentication (Gmail)Frode Aannevik2019-07-111-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | imaps+oauthbearer://user:token@host?token_endpoint=... - the config Source password is used as access token if no token_endpoint parameter is set - the config Source password is used as refresh token if token_endpoint parameter is set, and used to exchange with an access token The implementation has only been tested with Gmail. source = imaps+oauthbearer://{username}:{refersh_token}@imap.gmail.com:993? \ client_id=XX&\ client_secret=XX&\ token_endpoint=https%3A%2F%2Faccounts.google.com%2Fo%2Foauth2%2Ftoken client credentials created with https://console.developers.google.com/apis/credentials refresh token created with https://github.com/google/gmail-oauth2-tools/blob/master/python/oauth2.py rel: https://todo.sr.ht/~sircmpwn/aerc2/42
* Factor IMAP-specific structs out of UI modelsBen Burwell2019-07-083-8/+83
| | | | | | | Before, we were using several IMAP-specific concepts to represent information being displayed in the UI. Factor these structures out of the IMAP package to make it easier for other backends to provide the required information.
* Use []uint32 instead of imap.SeqSetBen Burwell2019-07-084-11/+25
| | | | | | | | A sequence-set is an IMAP-specific implementation detail. Throughout the UI, aerc simply operates using lists of opaque identifiers. In order to loosen the coupling between the UI and IMAP in particular, replace most usages of imap.SeqSet with []uint32, leaving the translation to a SeqSet to the IMAP backend as needed.
* Factor UI models out of the worker message packageBen Burwell2019-07-083-30/+49
| | | | | | | | Before, the information needed to display different parts of the UI was tightly coupled to the specific messages being sent back and forth to the backend worker. Separating out a models package allows us to be more specific about exactly what a backend is able to and required to provide for the UI.
* Sort out dirstore once and for allDrew DeVault2019-07-041-13/+0
|
* worker/imap: rig up search directory handlerDrew DeVault2019-06-241-0/+2
|
* worker/imap: implement searchDrew DeVault2019-06-241-0/+16
|
* imap: block until directory list is fully receivedDrew DeVault2019-06-141-0/+1
| | | | This fixes issues with INBOX mysteriously not being present at times
* imap: respect the folder config optionReto Brunner2019-06-142-1/+16
|
* Add :read and :unread commandsDrew DeVault2019-06-092-0/+19
|
* Update our message flags when server updates themDrew DeVault2019-06-092-2/+34
|
* Add archive commandRobert Günzler2019-06-092-0/+24
| | | | | | | | | | | | | | | Adds an archive command that moves the current message into the folder specified in the account config entry. Supports three layouts at this point: - flat: puts all messages next to each other - year: creates a folder per year - month: same as above, plus folders per month This also adds a "-p" argument to "cp" and "mv" that works like "--parents" on mkdir(1). We use this to auto-create the directories for the archive layout.
* Fetch headers w/peek to leave emails unreadYash Srivastav2019-06-081-0/+1
|
* implements ability to view headers in message viewYash Srivastav2019-06-071-1/+20
|
* Wait for listing to complete before sending DoneDrew DeVault2019-06-021-0/+3
|
* Don't send Done until finished fetching messagesDrew DeVault2019-06-021-0/+3
|
* Skip non selectable mailboxes in directory listingReto Brunner2019-05-261-0/+13
| | | | | | | | | | | | | | | | If a MailboxInfo has the attribute \Noselect, it is not possible to use this name as a selectable mailbox. Therefore it should not be passed to the directory handlers. The issue pops up if one has a hierarchy like this: INBOX INBOX/lists/stuff INBOX/lists/otherStuff Even though lists is not a valid inbox (doesn't contain mail, only other maildirs) it will show up in the directory listing, when we iterate over the MailboxInfo. It does have the corresponding attribute set though and we can simply filter it out.
* Load IMAP worker for imap+insecureDrew DeVault2019-05-201-2/+1
|
* Flesh out multipart switcherDrew DeVault2019-05-201-1/+1
|
* asdfDrew DeVault2019-05-201-42/+2
|
* s/aerc2/aerc/gDrew DeVault2019-05-176-6/+6
|
* Copy sent emails to the Sent folderDrew DeVault2019-05-152-0/+31
| | | | Or rather, to a user-specified folder
* Implement :copy (aka :cp)Drew DeVault2019-05-142-0/+18
|
* Handle external message deletionsDrew DeVault2019-05-131-0/+7
|
* Handle incoming emails gracefullyDrew DeVault2019-05-132-3/+23
|
* worker/imap: use the IMAP connection from a single goroutineSimon Ser2019-04-293-86/+77
| | | | | | | | | | | | | Unfortunately, the IMAP protocol hasn't been designed to be used from multiple goroutines at the same time. For instance, if you fetch twice the same message from two different goroutines, it's not possible to tell whether the response is for one receiver or the other. For this reason, go-imap clients aren't safe to use from multiple goroutines. This commit changes the IMAP workers to be synchronous again (a command is executed only after the previous one has completed). To use IMAP from different threads, popular clients (e.g. Thunderbird) typically open multiple connections.
* Make message viewer real, part twoDrew DeVault2019-03-311-11/+14
|
* Rename FetchMessageBodies to FetchFullMessagesDrew DeVault2019-03-312-12/+12
|
* Make the message viewer real, part oneDrew DeVault2019-03-312-6/+28
|
* Don't parse mail in worker; send a reader insteadDrew DeVault2019-03-311-10/+2
|
* Pull BodyStructure up from IMAP workerDrew DeVault2019-03-311-4/+6
|
* Add body fetching support codeDrew DeVault2019-03-292-15/+48
|
* Implement :delete-messageDrew DeVault2019-03-204-1/+50
|
* Display message subjects in message listDrew DeVault2019-03-142-0/+48
|