summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Graumann <johannes_graumann@web.de>2012-10-15 22:33:09 +0300
committerPaul Klos <kolab@klos2day.nl>2012-10-24 07:25:34 -0400
commit97fe39d0bf4bc0ce86a454d07ea7a4e58c2c4756 (patch)
tree5eb2eef68a0beebc21d88a29d8d7e0fffa1ada2b
parent6e49491cdfa359d79a076c9a74179c5b67612bb8 (diff)
downloadpykolab-97fe39d0bf4bc0ce86a454d07ea7a4e58c2c4756.tar.gz
Debianize: Provide main.cf from Debian's example file if user choose not to debconf-configure postfix during installation;
-rw-r--r--pykolab/setup/setup_mta.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index d91a3a7..bb37d27 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -20,6 +20,7 @@
from augeas import Augeas
from Cheetah.Template import Template
import os
+import shutil
import subprocess
import components
@@ -208,6 +209,13 @@ result_attribute = mail
}
+ 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'
+ )
+
myaugeas = Augeas()
setting_base = '/files/etc/postfix/main.cf/'