diff options
author | Johannes Graumann <johannes_graumann@web.de> | 2012-10-15 22:33:09 +0300 |
---|---|---|
committer | Johannes Graumann <johannes_graumann@web.de> | 2012-10-15 22:33:09 +0300 |
commit | 45c0bac1d190b6492c2dba5586cee6608cf2bf15 (patch) | |
tree | 57f77887289507667da22d62bb842483aafd0b1b /pykolab | |
parent | cc0c41beccb06fe7de7111affb96e3f0194ac839 (diff) | |
download | pykolab-45c0bac1d190b6492c2dba5586cee6608cf2bf15.tar.gz |
Debianize: Provide main.cf from Debian's example file if user choose not to debconf-configure postfix during installation;
Diffstat (limited to 'pykolab')
-rw-r--r-- | pykolab/setup/setup_mta.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py index 09f6d06..6a5c691 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/' |