# HG changeset patch # User Pascal Volk # Date 1269163046 0 # Node ID 8c4df3dd2d2c65acdf00e4a038b95152e89c285b # Parent 6526072ec709d5cf4bd4a9fd03d498051d639ed0 VMM: VirtualMailManager.__pwhash() added support for 'doveadm pw'. dovecotpw was replaced by `doveadm pw` in Dovecot v2.0. To use doveadm instead of dovecotpw use the following settings in vmm.cfg: [bin] dovecotpw = /path/to/doveadm [misc] dovecotvers = 20 diff -r 6526072ec709 -r 8c4df3dd2d2c VirtualMailManager/VirtualMailManager.py --- a/VirtualMailManager/VirtualMailManager.py Fri Jan 22 04:22:59 2010 +0000 +++ b/VirtualMailManager/VirtualMailManager.py Sun Mar 21 09:17:26 2010 +0000 @@ -415,8 +415,11 @@ return '{%s}%s' % (self.__scheme, self.__pwMD4(password)) elif self.__scheme in ['SMD5', 'SSHA', 'CRAM-MD5', 'HMAC-MD5', 'LANMAN', 'NTLM', 'RPA']: - return Popen([self.__Cfg.get('bin', 'dovecotpw'), '-s', - self.__scheme,'-p',password],stdout=PIPE).communicate()[0][:-1] + cmd_args = [self.__Cfg.get('bin', 'dovecotpw'), '-s', + self.__scheme, '-p', password] + if self.__Cfg.getint('misc', 'dovecotvers') >= 20: + cmd_args.insert(1, 'pw') + return Popen(cmd_args, stdout=PIPE).communicate()[0][:-1] else: return '{%s}%s' % (self.__scheme, password)