From 063187340ce257a633cc5e6b503112db306be2e6 Mon Sep 17 00:00:00 2001 From: Koni Marti Date: Tue, 7 Nov 2023 16:33:37 +0100 Subject: search: add rcpts fields to header in search criteria Add recipients fields (from, to, cc) to the header for filtering and searching for the maildir and mbox backends. Fixes: commit 8464b373 ("search: use a common api for all workers") Reported-by: Vitaly Ovchinnikov Signed-off-by: Koni Marti Acked-by: Robin Jarry Tested-by: Vitaly Ovchinnikov --- worker/maildir/search.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'worker/maildir/search.go') diff --git a/worker/maildir/search.go b/worker/maildir/search.go index cf954753..8a19d66d 100644 --- a/worker/maildir/search.go +++ b/worker/maildir/search.go @@ -11,8 +11,8 @@ import ( ) func (w *Worker) search(ctx context.Context, criteria *types.SearchCriteria) ([]uint32, error) { + criteria.PrepareHeader() requiredParts := lib.GetRequiredParts(criteria) - w.worker.Debugf("Required parts bitmask for search: %b", requiredParts) keys, err := w.c.UIDs(*w.selected) -- cgit