VirtualMailManager/VirtualMailManager.py
changeset 132 fa22bd13b4d1
parent 128 cf8116625866
child 133 2d5c4745efec
equal deleted inserted replaced
131:2b8154cc7ebe 132:fa22bd13b4d1
   515                 'relocated', 'detailed']:
   515                 'relocated', 'detailed']:
   516             raise VMMException(_(u'Invalid argument: »%s«') % details,
   516             raise VMMException(_(u'Invalid argument: »%s«') % details,
   517                     ERR.INVALID_AGUMENT)
   517                     ERR.INVALID_AGUMENT)
   518         if details == 'detailed':
   518         if details == 'detailed':
   519             details = 'full'
   519             details = 'full'
   520             warning = _(u"""\
   520             self.__warnings.append(_(u'\
   521 The keyword »detailed« is deprecated and will be removed in a future release.
   521 The keyword »detailed« is deprecated and will be removed in a future release.\n\
   522     Please use the keyword »full« to get full details.""")
   522    Please use the keyword »full« to get full details.'))
   523             self.__warnings.append(warning)
       
   524         dom = self.__getDomain(domainname)
   523         dom = self.__getDomain(domainname)
   525         dominfo = dom.getInfo()
   524         dominfo = dom.getInfo()
   526         if dominfo['domainname'].startswith('xn--'):
   525         if dominfo['domainname'].startswith('xn--'):
   527             dominfo['domainname'] += ' (%s)'\
   526             dominfo['domainname'] += ' (%s)'\
   528                 % VirtualMailManager.ace2idna(dominfo['domainname'])
   527                 % VirtualMailManager.ace2idna(dominfo['domainname'])
   686     def userTransport(self, emailaddress, transport):
   685     def userTransport(self, emailaddress, transport):
   687         acc = self.__getAccount(emailaddress)
   686         acc = self.__getAccount(emailaddress)
   688         acc.modify('transport', transport)
   687         acc.modify('transport', transport)
   689 
   688 
   690     def userDisable(self, emailaddress, service=None):
   689     def userDisable(self, emailaddress, service=None):
       
   690         if service == 'managesieve':
       
   691             service = 'sieve'
       
   692             self.__warnings.append(_(u'\
       
   693 The service name »managesieve« is deprecated and will be removed\n\
       
   694    in a future release.\n\
       
   695    Please use the service name »sieve« instead.'))
   691         acc = self.__getAccount(emailaddress)
   696         acc = self.__getAccount(emailaddress)
   692         acc.disable(self.__Cfg.getint('misc', 'dovecotvers'), service)
   697         acc.disable(self.__Cfg.getint('misc', 'dovecotvers'), service)
   693 
   698 
   694     def userEnable(self, emailaddress, service=None):
   699     def userEnable(self, emailaddress, service=None):
       
   700         if service == 'managesieve':
       
   701             service = 'sieve'
       
   702             self.__warnings.append(_(u'\
       
   703 The service name »managesieve« is deprecated and will be removed\n\
       
   704    in a future release.\n\
       
   705    Please use the service name »sieve« instead.'))
   695         acc = self.__getAccount(emailaddress)
   706         acc = self.__getAccount(emailaddress)
   696         acc.enable(self.__Cfg.getint('misc', 'dovecotvers'), service)
   707         acc.enable(self.__Cfg.getint('misc', 'dovecotvers'), service)
   697 
   708 
   698     def relocatedAdd(self, emailaddress, targetaddress):
   709     def relocatedAdd(self, emailaddress, targetaddress):
   699         relocated = self.__getRelocated(emailaddress, targetaddress)
   710         relocated = self.__getRelocated(emailaddress, targetaddress)