|
@@ -27,6 +27,7 @@ CONTENT_TYPE_TEXT_PLAIN = 'text/plain'
|
27
|
27
|
CONTENT_TYPE_TEXT_HTML = 'text/html'
|
28
|
28
|
|
29
|
29
|
IMAP_CHECKED_FLAG = imapclient.FLAGGED
|
|
30
|
+IMAP_SEEN_FLAG = imapclient.SEEN
|
30
|
31
|
|
31
|
32
|
MAIL_FETCHER_FILELOCK_TIMEOUT = 10
|
32
|
33
|
MAIL_FETCHER_CONNECTION_TIMEOUT = 60*3
|
|
@@ -441,6 +442,7 @@ class MailFetcher(object):
|
441
|
442
|
# Flag all correctly checked mail
|
442
|
443
|
if r.status_code in [200, 204, 400]:
|
443
|
444
|
imapc.add_flags((mail.uid,), IMAP_CHECKED_FLAG)
|
|
445
|
+ imapc.add_flags((mail.uid,), IMAP_SEEN_FLAG)
|
444
|
446
|
# TODO - G.M - Verify exception correctly works
|
445
|
447
|
except requests.exceptions.Timeout as e:
|
446
|
448
|
log = 'Timeout error to transmit fetched mail to tracim : {}'
|