VirtualMailManager/mailbox.py
branchv0.6.x
changeset 386 b7854259ad74
parent 377 920cb090eb09
child 415 c7a963e6cf6e
equal deleted inserted replaced
385:0cae9989395b 386:b7854259ad74
    21 
    21 
    22 
    22 
    23 __all__ = ('new', 'Maildir', 'SingleDbox', 'MultiDbox',
    23 __all__ = ('new', 'Maildir', 'SingleDbox', 'MultiDbox',
    24            'utf8_to_mutf7', 'mutf7_to_utf8')
    24            'utf8_to_mutf7', 'mutf7_to_utf8')
    25 
    25 
       
    26 _ = lambda msg: msg
    26 cfg_dget = lambda option: None
    27 cfg_dget = lambda option: None
    27 
    28 
    28 
    29 
    29 def _mbase64_encode(inp, dest):
    30 def _mbase64_encode(inp, dest):
    30     if inp:
    31     if inp:
   100         self._root = self._user.mail_location.directory
   101         self._root = self._user.mail_location.directory
   101         self._sep = '/'
   102         self._sep = '/'
   102         os.chdir(self._user.home)
   103         os.chdir(self._user.home)
   103 
   104 
   104     def _add_boxes(self, mailboxes, subscribe):
   105     def _add_boxes(self, mailboxes, subscribe):
       
   106         """Create all mailboxes from the `mailboxes` list.
       
   107         If `subscribe` is *True*, the mailboxes will be listed in the
       
   108         subscriptions file."""
   105         raise NotImplementedError
   109         raise NotImplementedError
   106 
   110 
   107     def _validate_box_name(self, name, good, bad):
   111     def _validate_box_name(self, name, good, bad):
   108         """
   112         """
   109         Validates the mailboxes name `name`.  When the name is valid, it
   113         Validates the mailboxes name `name`.  When the name is valid, it
   283         return MultiDbox(account)
   287         return MultiDbox(account)
   284     elif mbfmt == 'sdbox':
   288     elif mbfmt == 'sdbox':
   285         return SingleDbox(account)
   289         return SingleDbox(account)
   286     raise ValueError('unsupported mailbox format: %r' % mbfmt)
   290     raise ValueError('unsupported mailbox format: %r' % mbfmt)
   287 
   291 
   288 del cfg_dget
   292 del _, cfg_dget