VirtualMailManager/Handler.py
branchv0.6.x
changeset 264 04fea4d8b900
parent 262 6eea85d8b91d
child 266 e14c345b44a1
equal deleted inserted replaced
263:07fdc93dde9f 264:04fea4d8b900
   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') >= 20:
   384             if self._Cfg.dget('misc.dovecot_version') >= 0x20000a1:
   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