From 8dfcb7e08442b4af8f285bdd7732750938b25b9f Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 15 Dec 2013 04:59:30 +0100 Subject: Use postmulti to run postconf per instance. --- lib/postmulti | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'lib/postmulti') diff --git a/lib/postmulti b/lib/postmulti index 6aed553..cad01f8 100644 --- a/lib/postmulti +++ b/lib/postmulti @@ -19,11 +19,17 @@ # Look up postfix configuration variable def postconf(k, instance=None): - cmd = [ os.path.join(os.sep, 'usr', 'sbin', 'postconf') ] if instance: - config = os.path.join(os.sep, 'etc', 'postfix-%s' % instance) - cmd.extend([ '-c', config ]) - cmd.extend([ '-h', k ]) + cmd = [ os.path.join(os.sep, 'usr', 'sbin', 'postmulti') + , '-x' + , '-i', instance + , '--' + ] + else: + cmd = [] + + cmd.extend([ os.path.join(os.sep, 'usr', 'sbin', 'postconf') + , '-h', k ]) return subprocess.check_output(cmd, stderr=subprocess.STDOUT).rstrip() -- cgit v1.2.3