VirtualMailManager/Handler.py
branchv0.6.x
changeset 266 e14c345b44a1
parent 264 04fea4d8b900
child 270 d3389645a91d
equal deleted inserted replaced
265:3c0173418d5d 266:e14c345b44a1
   379             return '{%s}%s' % (self._scheme, self.__pwMD4(password))
   379             return '{%s}%s' % (self._scheme, self.__pwMD4(password))
   380         elif self._scheme in ['SMD5', 'SSHA', 'CRAM-MD5', 'HMAC-MD5',
   380         elif self._scheme in ['SMD5', 'SSHA', 'CRAM-MD5', 'HMAC-MD5',
   381                 'LANMAN', 'NTLM', 'RPA']:
   381                 'LANMAN', 'NTLM', 'RPA']:
   382             cmd_args = [self._Cfg.dget('bin.dovecotpw'), '-s', self._scheme,
   382             cmd_args = [self._Cfg.dget('bin.dovecotpw'), '-s', self._scheme,
   383                         '-p', password]
   383                         '-p', password]
   384             if self._Cfg.dget('misc.dovecot_version') >= 0x20000a1:
   384             if self._Cfg.dget('misc.dovecot_version') >= 0x20000a01:
   385                 cmd_args.insert(1, 'pw')
   385                 cmd_args.insert(1, 'pw')
   386             return Popen(cmd_args, stdout=PIPE).communicate()[0][:-1]
   386             return Popen(cmd_args, stdout=PIPE).communicate()[0][:-1]
   387         else:
   387         else:
   388             return '{%s}%s' % (self._scheme, password)
   388             return '{%s}%s' % (self._scheme, password)
   389 
   389