summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-07-18 10:38:14 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-07-18 10:38:14 +0100
commite389b12b4deb578ea2e57c50a24f47afc8a07981 (patch)
treef57adf832d2d3157fe7d10bf3451fee3ca488e8b
parent173da3f2b9e0b95550c20c4b36a3f0d90c0a29c7 (diff)
downloadpykolab-e389b12b4deb578ea2e57c50a24f47afc8a07981.tar.gz
Generate the localhost.pem dummy certificate if it doesn't exist (#886)
-rw-r--r--pykolab/setup/setup_mta.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index 4998acf..f9202d3 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -252,6 +252,9 @@ result_attribute = mail
log.error(_("Could not write out Postfix configuration file /etc/postfix/master.cf"))
return
+ if os.path.isfile('/etc/pki/tls/certs/make-dummy-cert') and not os.path.isfile('/etc/pki/tls/private/localhost.pem'):
+ subprocess.call(['/etc/pki/tls/certs/make-dummy-cert', '/etc/pki/tls/private/localhost.pem'])
+
amavisd_settings = {
'ldap_server': 'localhost',
'ldap_bind_dn': conf.get('ldap', 'service_bind_dn'),