Commit graph

13 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
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
Drew DeVault
2dc436555d Load IMAP worker for imap+insecure 2019-05-20 19:28:04 -04:00
Drew DeVault
98da4c9509 s/aerc2/aerc/g 2019-05-17 20:57:10 -04:00
Simon Ser
9ef2a57b51 worker/types: fix Worker.Callbacks race condition
Worker.Process* functions were called in different goroutines than
Worker.Post*. Protect the map with a mutex. Also make the map unexported to
prevent external unprotected accesses.

Worker.Process* functions used to delete items from the map. However they
didn't delete the element they retrieved: callbacks[msg.InResponseTo()] was
read while callbacks[msg] was deleted. I'm not sure I understand why. I tried
to delete the element that was accessed - but this broke everything (UI froze
at "Connecting..."). I don't believe any elements were actually removed from
the map, so the new code just doesn't remove anything.
2019-04-27 14:28:26 -04:00
Drew DeVault
1265d9cff8 Apply gofmt 2018-06-12 09:50:46 -04:00
Markus Ongyerth
67d14977fa fallthrough in worker selection 2018-06-12 09:49:38 -04:00
Drew DeVault
d24e4712a4 Reduce boilerplate in worker/UI 2018-02-01 18:42:03 -05:00
Drew DeVault
a21afdaa6b Improve logging 2018-01-31 21:18:21 -05:00
Drew DeVault
4074445cbb Move worker into account tab 2018-01-11 09:04:18 -05:00
emersion
a0be5e8025 Misc idiomatic fixes 2018-01-10 11:20:41 -05:00
Drew DeVault
b5d5e0dbed Parse account configuration 2018-01-09 21:31:36 -05:00
Drew DeVault
6394e386c2 Initial pass on worker/UI message passing 2018-01-09 20:39:00 -05:00