added imap filter for newer than
This commit is contained in:
parent
92aa5b5b8e
commit
0afdb1a2f0
|
|
@ -1124,6 +1124,15 @@ def build_imap_filter():
|
||||||
time_str = time.strftime('%d-%b-%Y', time_old)
|
time_str = time.strftime('%d-%b-%Y', time_old)
|
||||||
imap_filter.append("BEFORE %s" % time_str)
|
imap_filter.append("BEFORE %s" % time_str)
|
||||||
|
|
||||||
|
if options.date_old_min == None:
|
||||||
|
time_now = time.time()
|
||||||
|
secs_old_min = (options.days_old_min * 24 * 60 * 60)
|
||||||
|
time_old = time.gmtime(time_now - secs_old_min)
|
||||||
|
else:
|
||||||
|
time_old = time.gmtime(options.date_old_min)
|
||||||
|
time_str = time.strftime('%d-%b-%Y', time_old)
|
||||||
|
imap_filter.append("SINCE %s" % time_str)
|
||||||
|
|
||||||
if not options.include_flagged:
|
if not options.include_flagged:
|
||||||
imap_filter.append("UNFLAGGED")
|
imap_filter.append("UNFLAGGED")
|
||||||
if options.min_size:
|
if options.min_size:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue