summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--lib/feed2imap/imap.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a40edd..03930e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
Feed2Imap 0.4 (date unknown)
============================
+* New feed2imap-cleaner to remove old mails seen but not flagged
* Feed2Imap version number wasn't displayed in the User-Agent
* Better exception handling when parsing errors occur
* added feed2imap's RSS feed to the default feeds in the config file
diff --git a/lib/feed2imap/imap.rb b/lib/feed2imap/imap.rb
index bb905e6..4fc1302 100644
--- a/lib/feed2imap/imap.rb
+++ b/lib/feed2imap/imap.rb
@@ -121,7 +121,7 @@ class ImapAccount
def cleanup(folder, dryrun = false)
puts "-- Considering #{folder}:"
@connection.select(folder)
- a = ['NOT', 'NEW', 'NOT', 'FLAGGED', 'BEFORE', (Date::today - 10).strftime('%d-%b-%Y')]
+ a = ['SEEN', 'NOT', 'FLAGGED', 'BEFORE', (Date::today - 3).strftime('%d-%b-%Y')]
todel = @connection.search(a)
todel.each do |m|
f = @connection.fetch(m, "FULL")