예제 #1
0
파일: local.py 프로젝트: aksalj/Mailpile
 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
파일: local.py 프로젝트: zkvk/Mailpile
 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
파일: imap.py 프로젝트: nolboo/Mailpile
 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
파일: imap.py 프로젝트: ackermann/Mailpile
 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
파일: imap.py 프로젝트: whiteyeti/Mailpile
 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
파일: imap.py 프로젝트: tuals/Mailpile
 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
파일: pop3.py 프로젝트: zkvk/Mailpile
 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
파일: local.py 프로젝트: zkvk/Mailpile
 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
파일: maildir.py 프로젝트: 4myPAL/Mailpile
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     self.watching = -1
예제 #14
0
파일: imap.py 프로젝트: tclancy/Mailpile
 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
파일: pop3.py 프로젝트: runt18/Mailpile
 def _sleep(self, *args, **kwargs):
     self.close()
     return BaseMailSource._sleep(self, *args, **kwargs)
예제 #19
0
파일: imap.py 프로젝트: mailpile/Mailpile
 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
파일: pop3.py 프로젝트: zkvk/Mailpile
 def __init__(self, *args, **kwargs):
     BaseMailSource.__init__(self, *args, **kwargs)
     self.watching = -1
예제 #21
0
파일: pop3.py 프로젝트: zkvk/Mailpile
 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