caching_data = CachingData()
logging.warning("Cache version %s loaded.", caching_data.version)
user_reader = csv.DictReader(open("userdata.csv", "r"), delimiter=',')
-
+
# server name is stored in the config
server = config.get('basic_settings', 'imap_server')
# tolerance is now in seconds
try:
box = caching_data.retrieve_cached_mailbox(mailbox[0], mailbox[1], user['username'])
mail_ids = session.fetch_messages()
- new_ids = box.synchronize(mail_ids)
+ new_ids = box.synchronize(mail_ids, tolerance)
logging.info("%s new messages out of %s found in %s.", len(new_ids), len(mail_ids), box.name)
except UserWarning as ex:
logging.error(ex)
box.confirm_change()
# final report on date conflicts
- caching_data.report_date_conflicts()
+ caching_data.report_conflicts()
def load_configuration():
"""Loads the script configuration from a file or creates such."""