<feed xmlns='http://www.w3.org/2005/Atom'>
<title>aerc/worker/maildir, branch master</title>
<subtitle>mirror of ~rjarry's aerc fork - a pretty good email client
</subtitle>
<id>https://git.tilde.institute/akspecs/aerc/atom?h=master</id>
<link rel='self' href='https://git.tilde.institute/akspecs/aerc/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/akspecs/aerc/'/>
<updated>2021-12-06T22:50:04Z</updated>
<entry>
<title>maildir: watch for message renames</title>
<updated>2021-12-06T22:50:04Z</updated>
<author>
<name>Robin Jarry</name>
<email>robin@jarry.cc</email>
</author>
<published>2021-12-06T22:45:58Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/akspecs/aerc/commit/?id=abcd327359592ca7b552585a0f3837c930b126b4'/>
<id>urn:sha1:abcd327359592ca7b552585a0f3837c930b126b4</id>
<content type='text'>
Messages flags can also be changed without changing directories.
Changing flags in maildirs means renaming the message files. Also take
renames into account.

Link: https://cr.yp.to/proto/maildir.html
Fixes: f4d3c8fc77f9 ("maildir: watch for external changes")
Signed-off-by: Robin Jarry &lt;robin@jarry.cc&gt;
</content>
</entry>
<entry>
<title>maildir: watch for external changes</title>
<updated>2021-12-06T19:54:29Z</updated>
<author>
<name>Robin Jarry</name>
<email>robin@jarry.cc</email>
</author>
<published>2021-12-06T19:42:07Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/akspecs/aerc/commit/?id=f4d3c8fc77f97c1c01e85329c54c522c2cfd13bb'/>
<id>urn:sha1:f4d3c8fc77f97c1c01e85329c54c522c2cfd13bb</id>
<content type='text'>
When a maildir is synchronized by an external process while aerc is
running (e.g. mbsync), some emails may be moved out of "new" to "cur" or
completely deleted.

These deletions are ignored and aerc may assume these messages are still
here, leading to errors.

Take file deletions into account. Also, add "cur" to the watched
folders since these can be modified as well.

Signed-off-by: Robin Jarry &lt;robin@jarry.cc&gt;
</content>
</entry>
<entry>
<title>go.mod: change base git url</title>
<updated>2021-11-05T09:21:45Z</updated>
<author>
<name>Robin Jarry</name>
<email>robin@jarry.cc</email>
</author>
<published>2021-11-05T09:19:46Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/akspecs/aerc/commit/?id=0d645bcebda8d764c4f21f71ded1e3627d6e8837'/>
<id>urn:sha1:0d645bcebda8d764c4f21f71ded1e3627d6e8837</id>
<content type='text'>
I'm not sure what are the implications but it seems required.

Link: https://github.com/golang/go/issues/20883
Signed-off-by: Robin Jarry &lt;robin@jarry.cc&gt;
</content>
</entry>
<entry>
<title>maildir: track the recent flag correctly</title>
<updated>2021-11-01T12:30:45Z</updated>
<author>
<name>Reto Brunner</name>
<email>reto@labrat.space</email>
</author>
<published>2020-09-13T08:42:40Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/akspecs/aerc/commit/?id=bc48628839c656e7136540d25ad706cee4816944'/>
<id>urn:sha1:bc48628839c656e7136540d25ad706cee4816944</id>
<content type='text'>
In the maildir worker we manually need to track the Recent flag in order for the
notification command etc to work.

Push that responsibility to the container, we must make sure to manually add the
flag though if one grabs the message info.
</content>
</entry>
<entry>
<title>notmuch/maildir: remove double emit of the dirinfo</title>
<updated>2021-04-28T05:54:16Z</updated>
<author>
<name>Reto Brunner</name>
<email>reto@labrat.space</email>
</author>
<published>2021-04-26T19:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/akspecs/aerc/commit/?id=1687e558d3fae4d5622677c031bb9365a8c3e261'/>
<id>urn:sha1:1687e558d3fae4d5622677c031bb9365a8c3e261</id>
<content type='text'>
There was some bug which could be worked around by double emitting an event.
However that proofed to be brittle:

We send the first message here from the worker goroutine:
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/maildir/worker.g=
o#L306

Then Tick() is waked in the main goroutine and calls ProcessMessage:
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/widgets/account.go#L100

ProcessMessage in the main goroutine reads types.Message state with
msg.getId() and msg.InResponseTo():
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/types/worker.go#=
L74-76

Meanwhile in the worker goroutine we call PostMessage for a second
time with a pointer that points to the *same* previous message that
ProcessMessage is reading:
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/maildir/worker.g=
o#L306

The second PostMessage call makes writes to message while
ProcessMessage in the main goroutine is possibly reading:
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/types/worker.go#=
L59

This led to a data race in the event loop

Reported-By: Wagner Riffel &lt;w@104d.net&gt;
</content>
</entry>
<entry>
<title>maildir: don't read the full file into memory</title>
<updated>2021-02-08T08:06:42Z</updated>
<author>
<name>Reto Brunner</name>
<email>reto@labrat.space</email>
</author>
<published>2021-02-08T08:06:25Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/akspecs/aerc/commit/?id=8ecf0b73f41f9319f9d89d61f8d4619aa4e69758'/>
<id>urn:sha1:8ecf0b73f41f9319f9d89d61f8d4619aa4e69758</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add support for :rmdir</title>
<updated>2020-08-19T09:38:57Z</updated>
<author>
<name>ARaspiK</name>
<email>araspik@protonmail.com</email>
</author>
<published>2020-08-18T20:27:23Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/akspecs/aerc/commit/?id=fe1cabb077cf6c6cb3de122b3f5532acbeba8c85'/>
<id>urn:sha1:fe1cabb077cf6c6cb3de122b3f5532acbeba8c85</id>
<content type='text'>
The `:rmdir` command removes the current directory (`-f` is required if
the directory is not empty).

This is not supported on the notmuch backend.

An issue with the maildir backend is that some sync programs (e.g.
offlineimap) may recover the directory after it is deleted.  They need
to specifically be configured to accept deletions, or special commands
need to be executed (e.g. `offlineimap --delete-folder`) to properly
delete folders.

A danger of using this on the IMAP backend is that it is possible for a
new message to be added to the directory and for aerc to not show it
immediately (due to a slow connection) - using `:rmdir` at this moment
(with `-f` if the directory already contains messages) would delete the
directory and the new message that just arrived (and all other
contents).  This is documented in aerc(1) so that users are aware of
possible risks.
</content>
</entry>
<entry>
<title>maildir: Provide nicer error message on invalid url</title>
<updated>2020-07-27T16:26:57Z</updated>
<author>
<name>Tero Koskinen</name>
<email>tero.koskinen@iki.fi</email>
</author>
<published>2020-07-25T08:11:13Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/akspecs/aerc/commit/?id=f81cc2803cca4a5213a9d4514ddae8417c23f8ee'/>
<id>urn:sha1:f81cc2803cca4a5213a9d4514ddae8417c23f8ee</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Remove hard coded bodystruct path everywhere</title>
<updated>2020-07-27T07:19:27Z</updated>
<author>
<name>Reto Brunner</name>
<email>reto@labrat.space</email>
</author>
<published>2020-06-19T15:58:08Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/akspecs/aerc/commit/?id=c574a838fa89bf46bf7188442f400b206b04df95'/>
<id>urn:sha1:c574a838fa89bf46bf7188442f400b206b04df95</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Add flag based search options</title>
<updated>2020-07-25T06:08:08Z</updated>
<author>
<name>Tobias Wölfel</name>
<email>tobias.woelfel@mailbox.org</email>
</author>
<published>2020-07-24T08:36:19Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/akspecs/aerc/commit/?id=494bd674a98bc9f2889acad0fda3ff4c77c641b5'/>
<id>urn:sha1:494bd674a98bc9f2889acad0fda3ff4c77c641b5</id>
<content type='text'>
Provide search and filter with the option to specify more flag based
conditions.
Use '-x &lt;flag&gt;' to search for messages with a flag (seen, answered,
flagged) and '-X &lt;flag&gt;' to search for messages without a flag.
</content>
</entry>
</feed>
