aboutsummaryrefslogtreecommitdiff
path: root/internal/imap/connection.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/imap/connection.go')
-rw-r--r--internal/imap/connection.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/imap/connection.go b/internal/imap/connection.go
index e8d4da2..213171e 100644
--- a/internal/imap/connection.go
+++ b/internal/imap/connection.go
@@ -225,6 +225,7 @@ func (conn *connection) replace(folder Folder, header, value, newContent string,
func (conn *connection) searchHeader(header, value string) ([]uint32, error) {
criteria := imap.NewSearchCriteria()
criteria.Header.Set(header, value)
+ criteria.WithoutFlags = []string{imap.DeletedFlag}
ids, err := conn.search(criteria)
if err != nil {
return nil, fmt.Errorf("searching for header %q=%q: %w", header, value, err)