aboutsummaryrefslogtreecommitdiff
path: root/internal/imap
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2021-02-21 00:53:24 +0100
committerRené 'Necoro' Neumann <necoro@necoro.eu>2021-02-21 00:53:24 +0100
commit1cc4c12379e90abcb32397c15af729e3618c65e2 (patch)
tree02df3b6fb7346566d4952f557e1e2ee5229989e8 /internal/imap
parentf3b11edfb9d4f75ec10c04da4e52a1b29d929368 (diff)
downloadfeed2imap-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')
-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)
t/debian/files?h=1.1.4&id=92b1693bfc64dd34ab3f381263d6346f3e5f6179&follow=1'>Bump debian version horribly.1.1Jason A. Donenfeld2-2/+2 2012-09-04No echo mode.Jason A. Donenfeld2-16/+42 2012-09-04Properly quote the path too.Jason A. Donenfeld1-1/+1 2012-09-04Allow passwords having spaces to go unbroken to the clipboard.Bernardo Freitas Paulo da Costa1-1/+1 2012-09-04Separate out the massive git example.Jason A. Donenfeld1-10/+14 2012-09-04Prepare for debianification.1.0Jason A. Donenfeld9-4/+60 2012-09-03Fix readme typo.Jason A. Donenfeld1-1/+1 2012-09-03Show program name properly in error message.Jason A. Donenfeld1-1/+1 2012-09-03Move examples into manpage.Jason A. Donenfeld4-93/+224 2012-09-03Make into a real project.Jason A. Donenfeld8-5/+173 2012-09-03Support pass gitJason A. Donenfeld2-1/+15 2012-08-31Add remove synonyms.Jason A. Donenfeld1-2/+2 2012-08-31Use basename in usage.Jason A. Donenfeld1-2/+1 2012-08-19now using gpg_id as a varMatthew Ramirez1-2/+2 2012-08-07Forty five seconds.Jason A. Donenfeld1-1/+1 2012-08-06Deal with klipper and new lines.Jason A. Donenfeld1-3/+19 2012-08-06Update examples.Jason A. Donenfeld1-7/+7 2012-08-06Update readme.Jason A. Donenfeld1-11/+13 2012-08-06Be slicker and more like git.Jason A. Donenfeld1-114/+173