From dfaab1f1d73e557bbdbcc428f04f701c0c09c136 Mon Sep 17 00:00:00 2001 From: Koni Marti Date: Wed, 21 Jun 2023 22:13:05 +0200 Subject: maildir: add folder-map Add the folder-map functionality to the maildir backend. If the folder-map config option is specified, the folder-map worker middleware is used. Unroll the worker.PostMessageInfoError function for a streamlined WorkerInteractor interface. Signed-off-by: Koni Marti Tested-by: Bence Ferdinandy Signed-off-by: Robin Jarry --- worker/mbox/worker.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'worker/mbox/worker.go') diff --git a/worker/mbox/worker.go b/worker/mbox/worker.go index 5034f66d..8ed04e05 100644 --- a/worker/mbox/worker.go +++ b/worker/mbox/worker.go @@ -162,8 +162,16 @@ func (w *mboxWorker) handleMessage(msg types.WorkerMessage) error { } msgInfo, err := messageInfo(m, true) if err != nil { - w.worker.PostMessageInfoError(msg, uid, err) - break + w.worker.PostMessage(&types.MessageInfo{ + Info: &models.MessageInfo{ + Envelope: &models.Envelope{}, + Flags: models.SeenFlag, + Uid: uid, + Error: err, + }, + Message: types.RespondTo(msg), + }, nil) + continue } else { switch { case len(w.headersExclude) > 0: -- cgit