Exemple #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
Exemple #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
Exemple #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 = ""
Exemple #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 = ''
Exemple #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 = ''
Exemple #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 = ''
Exemple #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 = ''
Exemple #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
     ]
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #12
0
 def quit(self, *args, **kwargs):
     if self.conn:
         self.conn.quit()
     return BaseMailSource.quit(self, *args, **kwargs)
Exemple #13
0
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     self.watching = -1
Exemple #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
Exemple #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)
Exemple #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)
Exemple #17
0
 def quit(self, *args, **kwargs):
     if self.conn:
         self.conn.quit()
     return BaseMailSource.quit(self, *args, **kwargs)
Exemple #18
0
 def _sleep(self, *args, **kwargs):
     self.close()
     return BaseMailSource._sleep(self, *args, **kwargs)
Exemple #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]
Exemple #20
0
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     self.watching = -1
Exemple #21
0
 def _sleep(self, *args, **kwargs):
     self.close()
     return BaseMailSource._sleep(self, *args, **kwargs)
Exemple #22
0
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     self.watching = -1
     self.capabilities = None
     self.conn = None