aboutsummaryrefslogtreecommitdiffstats
path: root/worker/imap/worker.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-08-16 16:23:39 -0500
committerRobin Jarry <robin@jarry.cc>2022-08-22 15:46:53 +0200
commit64e1a7ca933b404d3556e776d0373069c1a0b763 (patch)
tree46a53da095c96952cd2478e1b3e7fe962adde7d4 /worker/imap/worker.go
parent57933f65ab456fc4ac81423422b6686801e08c9e (diff)
downloadaerc-64e1a7ca933b404d3556e776d0373069c1a0b763.tar.gz
imap: implement MoveMessages handling
Implement MoveMessages in the imap backend. go-imap includes the MOVE Imap extension by default, and if a server does not support it the command fallsback to a copy-and-delete operation. Servers with the MOVE extension will see a slight performance increase when moving messages due to fewer round trips. The IMAP implementation uses a MessagesMoved worker message to avoid polling the destination mailbox. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker/imap/worker.go')
-rw-r--r--worker/imap/worker.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/worker/imap/worker.go b/worker/imap/worker.go
index 6b6c9261..66e4cdf6 100644
--- a/worker/imap/worker.go
+++ b/worker/imap/worker.go
@@ -205,6 +205,8 @@ func (w *IMAPWorker) handleMessage(msg types.WorkerMessage) error {
w.handleAnsweredMessages(msg)
case *types.CopyMessages:
w.handleCopyMessages(msg)
+ case *types.MoveMessages:
+ w.handleMoveMessages(msg)
case *types.AppendMessage:
w.handleAppendMessage(msg)
case *types.SearchDirectory: