Пример #1
0
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     if not self.my_config.name:
         self.my_config.name = _('Local mailboxes')
     self.my_config.protocol = 'local'  # We may be upgrading an old
                                        # mbox or maildir source.
     self.watching = -1
Пример #2
0
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     if not self.my_config.name:
         self.my_config.name = _('Local mail')
     self.my_config.protocol = 'local'  # We may be upgrading an old
     # mbox or maildir source.
     self.watching = -1
Пример #3
0
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     self.timeout = self.DEFAULT_TIMEOUT
     self.watching = -1
     self.capabilities = set()
     self.conn = None
     self.conn_id = ""
Пример #4
0
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     self.timeout = self.TIMEOUT_INITIAL
     self.watching = -1
     self.capabilities = set()
     self.conn = None
     self.conn_id = ''
Пример #5
0
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     self.timeout = self.TIMEOUT_INITIAL
     self.watching = -1
     self.capabilities = set()
     self.conn = None
     self.conn_id = ''
Пример #6
0
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     self.timeout = self.TIMEOUT_INITIAL
     self.last_op = 0
     self.watching = -1
     self.capabilities = set()
     self.namespaces = {'private': []}
     self.flag_cache = {}
     self.conn = None
     self.conn_id = ''
Пример #7
0
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     self.timeout = self.TIMEOUT_INITIAL
     self.last_op = 0
     self.watching = -1
     self.capabilities = set()
     self.namespaces = {'private': []}
     self.flag_cache = {}
     self.conn = None
     self.conn_id = ''
Пример #8
0
 def _sorted_mailboxes(self):
     # This allows changes to BLACKLISTED_MAILBOXES to have an effect
     # even if peoples' configs say otherwise.
     return [
         m for m in BaseMailSource._sorted_mailboxes(self)
         if m.name.lower() not in BLACKLISTED_MAILBOXES
     ]
Пример #9
0
 def _create_tag(self, *args, **kwargs):
     ptag = kwargs.get('parent')
     try:
         if ptag:
             return self.session.config.get_tags(ptag)[0]._key
     except (IndexError, KeyError):
         pass
     return BaseMailSource._create_tag(self, *args, **kwargs)
Пример #10
0
 def _mailbox_sort_key(self, mbx):
     # Sort mailboxes so the most recently modified get scanned first.
     mt = 0
     for p in self._data_paths(mbx):
         try:
             mt = max(mt, os.path.getmtime(p))
         except (OSError, IOError):
             pass
     if mt:
         return '%20.20d' % (0x10000000000 - long(mt))
     else:
         return BaseMailSource._mailbox_sort_key(self, mbx)
Пример #11
0
 def _mailbox_sort_key(self, mbx):
     # Sort mailboxes so the most recently modified get scanned first.
     mt = 0
     for p in self._data_paths(mbx):
         try:
             mt = max(mt, os.path.getmtime(p))
         except (OSError, IOError):
             pass
     if mt:
         return "%20.20d" % (0x10000000000 - long(mt))
     else:
         return BaseMailSource._mailbox_sort_key(self, mbx)
Пример #12
0
 def quit(self, *args, **kwargs):
     if self.conn:
         self.conn.quit()
     return BaseMailSource.quit(self, *args, **kwargs)
Пример #13
0
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     self.watching = -1
Пример #14
0
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     self.timeout = self.DEFAULT_TIMEOUT
     self.watching = -1
     self.capabilities = set()
     self.conn = None
Пример #15
0
 def _sleep(self, seconds):
     # FIXME: While we are sleeping, we should switch to IDLE mode
     #        if it is available.
     if 'IDLE' in self.capabilities:
         pass
     return BaseMailSource._sleep(self, seconds)
Пример #16
0
 def _sleep(self, seconds):
     # FIXME: While we are sleeping, we should switch to IDLE mode
     #        if it is available.
     if 'IDLE' in self.capabilities:
         pass
     return BaseMailSource._sleep(self, seconds)
Пример #17
0
 def quit(self, *args, **kwargs):
     if self.conn:
         self.conn.quit()
     return BaseMailSource.quit(self, *args, **kwargs)
Пример #18
0
 def _sleep(self, *args, **kwargs):
     self.close()
     return BaseMailSource._sleep(self, *args, **kwargs)
Пример #19
0
 def _sorted_mailboxes(self):
     # This allows changes to BLACKLISTED_MAILBOXES to have an effect
     # even if peoples' configs say otherwise.
     return [
         m for m in BaseMailSource._sorted_mailboxes(self)
         if m.name.lower() not in BLACKLISTED_MAILBOXES]
Пример #20
0
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     self.watching = -1
Пример #21
0
 def _sleep(self, *args, **kwargs):
     self.close()
     return BaseMailSource._sleep(self, *args, **kwargs)
Пример #22
0
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     self.watching = -1
     self.capabilities = None
     self.conn = None