예제 #1
0
 def __deletefolder(self, options):
     list_accounts = self._get_activeaccounts(options)
     if len(list_accounts) != 1:
         self.ui.error("you must supply only one account with '-a'")
         return 1
     account = accounts.Account(self.config, list_accounts.pop())
     return account.deletefolder(options.deletefolder)
예제 #2
0
 def __migratefmd5(self, options):
     for accountname in self._get_activeaccounts(options):
         account = accounts.Account(self.config, accountname)
         localrepo = Repository(account, 'local')
         if localrepo.getfoldertype() != folder.Maildir.MaildirFolder:
             continue
         folders = localrepo.getfolders()
         for f in folders:
             f.migratefmd5(options.dryrun)
예제 #3
0
 def __serverdiagnostics(self, options):
     self.ui.info("  imaplib2: %s (%s)" %
                  (imaplib.__version__, imaplib.DESC))
     for accountname in self._get_activeaccounts(options):
         account = accounts.Account(self.config, accountname)
         account.serverdiagnostics()