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
--- 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)