equal
deleted
inserted
replaced
19 from subprocess import Popen, PIPE |
19 from subprocess import Popen, PIPE |
20 |
20 |
21 from pyPgSQL import PgSQL # python-pgsql - http://pypgsql.sourceforge.net |
21 from pyPgSQL import PgSQL # python-pgsql - http://pypgsql.sourceforge.net |
22 |
22 |
23 import VirtualMailManager.constants.ERROR as ERR |
23 import VirtualMailManager.constants.ERROR as ERR |
24 from VirtualMailManager import ENCODING, exec_ok |
24 from VirtualMailManager import ENCODING, exec_ok, set_configuration |
25 from VirtualMailManager.Account import Account |
25 from VirtualMailManager.Account import Account |
26 from VirtualMailManager.Alias import Alias |
26 from VirtualMailManager.Alias import Alias |
27 from VirtualMailManager.AliasDomain import AliasDomain |
27 from VirtualMailManager.AliasDomain import AliasDomain |
28 from VirtualMailManager.Config import Config as Cfg |
28 from VirtualMailManager.Config import Config as Cfg |
29 from VirtualMailManager.Domain import Domain, ace2idna, get_gid |
29 from VirtualMailManager.Domain import Domain, ace2idna, get_gid |
71 self._Cfg = Cfg(self._cfgFileName) |
71 self._Cfg = Cfg(self._cfgFileName) |
72 self._Cfg.load() |
72 self._Cfg.load() |
73 if not skip_some_checks: |
73 if not skip_some_checks: |
74 self._Cfg.check() |
74 self._Cfg.check() |
75 self._chkenv() |
75 self._chkenv() |
76 self._scheme = self._Cfg.dget('misc.password_scheme') |
76 # will be moved to the new password module and Alias |
77 self._postconf = Postconf(self._Cfg.dget('bin.postconf')) |
77 #self._scheme = self._Cfg.dget('misc.password_scheme') |
|
78 #self._postconf = Postconf(self._Cfg.dget('bin.postconf')) |
|
79 set_configuration(self._Cfg) |
78 |
80 |
79 def __findCfgFile(self): |
81 def __findCfgFile(self): |
80 for path in ['/root', '/usr/local/etc', '/etc']: |
82 for path in ['/root', '/usr/local/etc', '/etc']: |
81 tmp = os.path.join(path, 'vmm.cfg') |
83 tmp = os.path.join(path, 'vmm.cfg') |
82 if os.path.isfile(tmp): |
84 if os.path.isfile(tmp): |