summaryrefslogtreecommitdiffstats
path: root/postfix_wizard/Postfix.pm
diff options
context:
space:
mode:
Diffstat (limited to 'postfix_wizard/Postfix.pm')
-rwxr-xr-xpostfix_wizard/Postfix.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/postfix_wizard/Postfix.pm b/postfix_wizard/Postfix.pm
index ea76ca7c..27631162 100755
--- a/postfix_wizard/Postfix.pm
+++ b/postfix_wizard/Postfix.pm
@@ -34,7 +34,10 @@ use Libconf qw(:functions);
use Libconf::Glueconf::Postfix::Main_cf;
-if (!-f "/etc/postfix/main.cf") { cp_af("/etc/postfix/main.cf.dist", "/etc/postfix/main.cf") }
+my $default_conf = "/etc/postfix/main.cf.dist";
+# provide a default postfix configuration file
+!-d $default_conf and cp_af("/usr/share/wizards/postfix_wizard/main.cf.dist", $default_conf);
+if (!-f "/etc/postfix/main.cf") { cp_af($default_conf, "/etc/postfix/main.cf") }
my $postfix = new Libconf::Glueconf::Postfix::Main_cf({ filename => '/etc/postfix/main.cf', });
use Data::Dumper;
print Dumper($postfix);