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
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
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 = ""
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 = ''
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 = ''
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 ]
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)
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)
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)
def quit(self, *args, **kwargs): if self.conn: self.conn.quit() return BaseMailSource.quit(self, *args, **kwargs)
def __init__(self, *args, **kwargs): BaseMailSource.__init__(self, *args, **kwargs) self.watching = -1
def __init__(self, *args, **kwargs): BaseMailSource.__init__(self, *args, **kwargs) self.timeout = self.DEFAULT_TIMEOUT self.watching = -1 self.capabilities = set() self.conn = None
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)
def _sleep(self, *args, **kwargs): self.close() return BaseMailSource._sleep(self, *args, **kwargs)
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]
def __init__(self, *args, **kwargs): BaseMailSource.__init__(self, *args, **kwargs) self.watching = -1 self.capabilities = None self.conn = None