diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2021-02-21 00:53:24 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2021-02-21 00:53:24 +0100 |
commit | 1cc4c12379e90abcb32397c15af729e3618c65e2 (patch) | |
tree | 02df3b6fb7346566d4952f557e1e2ee5229989e8 /internal/imap/connection.go | |
parent | f3b11edfb9d4f75ec10c04da4e52a1b29d929368 (diff) | |
download | feed2imap-go-1cc4c12379e90abcb32397c15af729e3618c65e2.tar.gz feed2imap-go-1cc4c12379e90abcb32397c15af729e3618c65e2.tar.bz2 feed2imap-go-1cc4c12379e90abcb32397c15af729e3618c65e2.zip |
#39 Ignore mails marked as deleted when looking for existing mails, as to not undelete them by accident.
Diffstat (limited to 'internal/imap/connection.go')
-rw-r--r-- | internal/imap/connection.go | 1 |
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) |