aerc/worker
Tim Culverhouse 1c9fc7b6b1 maildir: remove filename encoded UID when moving messages
The built-in maildir.Dir.Move method performs an OS level file rename,
which allows for preserving file creation time. Commit c98f704874
("move: enable MoveMessages from msgstore") enabled the use of the Move
method for maildir. One particular maildir synchronizer (isync/mbsync)
encodes the UID within the filename of the email and cannot recover if
the UID is preserved during a move. mbsync encodes filenames like so:

	/path/to/email/{maildir-key},U={uid}:2,S

OfflineIMAP encodes the UID within the filename, but also encodes a hash
of the originating folder so that it can recover from a move without a
rename of the underlying file. OfflineIMAP encodes like so:

	/path/to/email{maildir-key},U={uid},FMD5={folder-hash}:2,S

Remove encoded UIDs of the form `,U={uid}` from filenames to prevent
sync issues.

Fixes: https://todo.sr.ht/~rjarry/aerc/75
Fixes: c98f704874 ("move: enable MoveMessages from msgstore")
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-08-24 17:00:44 +02:00
..
handlers go.mod: change base git url 2021-11-05 10:21:45 +01:00
imap imap: implement MoveMessages handling 2022-08-22 15:46:53 +02:00
lib parse: remove trailing whitespace from rfc1123z regex 2022-08-22 15:46:56 +02:00
maildir maildir: remove filename encoded UID when moving messages 2022-08-24 17:00:44 +02:00
mbox mbox: implement MoveMessages handling 2022-08-22 15:46:52 +02:00
notmuch go: removed io/ioutil 2022-08-22 09:30:19 +02:00
types worker: introduce MoveMessages type 2022-08-22 15:46:51 +02:00
handler_notmuch.go format: reformat code with go 1.17 2021-12-11 23:24:08 +01:00
worker.go logging: use level-based logger functions 2022-07-23 22:52:15 +02:00
worker_enabled.go mbox: implement an mbox backend worker 2022-07-14 23:14:45 +02:00