summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Boddie <paul@boddie.org.uk>2014-09-12 21:47:58 +0200
committerPaul Boddie <paul@boddie.org.uk>2014-09-12 21:47:58 +0200
commitaed6436f32a4c17d047b359732e86c6091152001 (patch)
treed757595ba55849a51265c19784987d2dbb9620d9
parent21da13431fa9f8c04f1acdc293c65ef4f2c2335e (diff)
downloadpykolab-aed6436f32a4c17d047b359732e86c6091152001.tar.gz
Fix check-only mode for an unconfigured MTA.
-rw-r--r--pykolab/setup/setup_mta.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index 73c21a8..94ec8fb 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -183,6 +183,7 @@ def _execute(*args, **kw):
# Ask for details of the certificate, if appropriate.
if (unset_certificate or conf.reset_postfix_config) and not conf.check_only:
+
default_certificate_name = is_debian() and 'ssl-cert-snakeoil' or 'localhost'
certificate_name = ask_question("kolab-conf/ssl-certificate-selection",
@@ -205,7 +206,7 @@ def _execute(*args, **kw):
# inconsistency between usage of .pem and .key for the keys, but
# certificates always seem to use .pem as their suffix.
- missing_certificate = not isfile(current_certificate)
+ missing_certificate = not current_certificate or not isfile(current_certificate)
if missing_certificate and not conf.check_only:
make_ssl_certificate(current_key)