Commit graph

89 commits

Author SHA1 Message Date
Ben Burwell
6473848d87 maildir: Watch for new messages
When a directory is opened, start watching its "new" subdirectory for
incoming messages using the fsnotify library. When creation events are
detected, run the Unseen routine to move the message from new to cur and
add new UIDs to the store, updating the UI's list of directory contents
as we go.
2019-07-17 17:29:11 -04:00
Ben Burwell
840b5bd633 Handle the invalid "utf8" encoding
See commit 0bfc369eb68a1d34ea0ee983f218e97a14099959 in the go-message
package.
2019-07-12 11:26:39 -04:00
Ben Burwell
1b8b6e218c Add maildir backend worker
Add the initial implementation of a backend for Maildir accounts. Much
of the functionality required is implemented in the go-message and
go-maildir libraries, so we use them as much as possible.

The maildir worker hooks into a new maildir:// URL scheme in the
accounts.conf file which points to a container of several maildir
directories. From there, the OpenDirectory, FetchDirectoryContents, etc
messages work on subdirectories. This is implemented as a Container
struct which handles mapping between the symbolic email folder names and
UIDs to the concrete directories and file names.
2019-07-12 11:09:50 -04:00
Frode Aannevik
b0eaf5191c Support imaps with oauthbearer authentication (Gmail)
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
2019-07-11 19:36:14 -04:00
Daniel Lublin
963d251289 Set the required go version for this module, aerc
This is the way to declare which compiler version a module requires to build.

I read up on https://golang.org/doc/go1.12#modules
2019-06-27 09:24:20 -04:00
Drew DeVault
ab79bc3447 Update tcell 2019-06-15 23:30:12 -04:00
Clayton Craft
f5a4d935ef Update reply to use getopt posix optind format
This changes the handling of optind for the 'reply' command to match
recent changes to getopt.
2019-06-09 15:50:50 -04:00
Simon Ser
0c2ede593f Update dependencies
This should get rid of this error message:

    tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config
2019-06-04 14:29:09 -04:00
Drew DeVault
2be985fecb Update tcell fork 2019-06-02 10:08:06 -04:00
Drew DeVault
56b84d3da5 Use forked version of tcell 2019-06-01 11:28:29 -04:00
Drew DeVault
62cd0b08aa Update terminal color handling per vterm changes 2019-05-26 15:48:29 -04:00
Drew DeVault
855362d813 Update to the latest go-libvterm 2019-05-26 15:13:37 -04:00
Drew DeVault
9cedb054e1 Update go-libvterm 2019-05-26 14:18:19 -04:00
Drew DeVault
cef784bf52 Fix special characters in address.PersonalName 2019-05-25 11:56:56 -04:00
Simon Ser
43dba93263 Update go-imap and go-imap-idle
This fixes a race condition in go-imap-idle. See [1].

[1]: 2704abd705
2019-05-19 11:37:40 -04:00
Drew DeVault
98da4c9509 s/aerc2/aerc/g 2019-05-17 20:57:10 -04:00
Drew DeVault
8be59cae6c Implement :reply -q and :reply -a 2019-05-16 12:39:22 -04:00
Drew DeVault
475b697bdf Implement (basic form) of :reply 2019-05-16 12:15:34 -04:00
Drew DeVault
b0bf09b98f Copy sent emails to the Sent folder
Or rather, to a user-specified folder
2019-05-15 19:41:21 -04:00
Drew DeVault
29de3297a1 Implement sending emails /o/ 2019-05-14 14:07:27 -04:00
Drew DeVault
6c36e04c1f Add :send-message, prepares & writes email to /tmp 2019-05-14 13:07:48 -04:00
Simon Ser
072bc26872 Update go-imap to 1.0.0-beta.4
This release contains race conditions fixes.
2019-04-29 09:29:41 -04:00
Elias Naur
e72574c308 go get git.sr.ht/~sircmpwn/go-libvterm
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-21 16:17:40 -04:00
Drew DeVault
bbdf9df75e Add basic filter implementation 2019-03-31 14:24:53 -04:00
Drew DeVault
143289bbd0 Don't parse mail in worker; send a reader instead 2019-03-31 11:29:57 -04:00
Drew DeVault
700dea23fa Implement :pipe 2019-03-30 11:58:24 -04:00
Drew DeVault
77ede6eb5a Add body fetching support code 2019-03-29 22:36:15 -04:00
Drew DeVault
0b26241b42 Improve cursor handling in embedded terminal 2019-03-21 21:00:03 -04:00
Drew DeVault
55ad16bb70 Fix cursor handling in embedded terminal 2019-03-21 19:56:47 -04:00
Drew DeVault
28f393bdbd Forward key events to child terminal 2019-03-21 19:50:54 -04:00
Drew DeVault
16c3f0a893 Handle terminal title, login shell 2019-03-17 17:08:54 -04:00
Drew DeVault
1170893e39 Add basic terminal widget 2019-03-17 14:02:33 -04:00
Drew DeVault
513e8aa94b Rename :cd -> :cf, add :cd 2019-03-15 10:47:09 -04:00
Drew DeVault
8d20e9218e Implement key bindings subsystem
Which is not yet rigged up
2019-03-15 01:31:23 -04:00
Drew DeVault
d394fd1f3b Flesh out command parsing & handling 2019-03-10 21:23:22 -04:00
Drew DeVault
0911cd5050 Initialize worker in account widget 2019-01-13 13:03:28 -05:00
Drew DeVault
28021ede1b Update go.mod 2018-06-01 16:56:41 -07:00
Markus Ongyerth
80e891a802 switch to tcell from termbox
This is a simple mostly straight forward switch to tcell in favor of
termbox.
It uses the tcell native api (not the compat layer) but does not make
use of most features.

Further changes should include moving to tcell's views.TextArea and the
general built in widget behaviour instead of the current ad hoc
implementation.

Regression: Cursor isn't shown in ex-line
2018-06-01 16:04:43 -07:00
Drew DeVault
3836d240c9 Switch to vgo 2018-03-02 09:27:44 -05:00