summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2019-05-28 15:37:36 +0200
committerAleksander Machniak <machniak@kolabsys.com>2019-05-28 15:37:36 +0200
commit5615f05304e58acc57924f02f03d115eb03e5bd6 (patch)
tree1f7300a5a0b332e1f680a139e1a7009e45cb9464
parent36c3ab0dda8d05780a5edf5fb4a6a099953b6bde (diff)
downloadpykolab-5615f05304e58acc57924f02f03d115eb03e5bd6.tar.gz
Make sure main.cf exists before executing postmap
-rw-r--r--pykolab/setup/setup_mta.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index 98ce6b6..c3c4154 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -235,6 +235,13 @@ result_format = "shared+%%s"
},
}
+ if not os.path.isfile('/etc/postfix/main.cf'):
+ if os.path.isfile('/usr/share/postfix/main.cf.debian'):
+ shutil.copy(
+ '/usr/share/postfix/main.cf.debian',
+ '/etc/postfix/main.cf'
+ )
+
if not os.path.isdir('/etc/postfix/ldap'):
os.mkdir('/etc/postfix/ldap/', 0770)
@@ -281,13 +288,6 @@ result_format = "shared+%%s"
postfix_main_settings['smtpd_tls_cert_file'] = "/etc/ssl/private/cyrus-imapd.pem"
postfix_main_settings['smtpd_tls_key_file'] = "/etc/ssl/private/cyrus-imapd.pem"
- if not os.path.isfile('/etc/postfix/main.cf'):
- if os.path.isfile('/usr/share/postfix/main.cf.debian'):
- shutil.copy(
- '/usr/share/postfix/main.cf.debian',
- '/etc/postfix/main.cf'
- )
-
# Copy header checks files
for hc_file in [ 'inbound', 'internal', 'submission' ]:
if not os.path.isfile("/etc/postfix/header_checks.%s" % (hc_file)):