summaryrefslogtreecommitdiffstats
path: root/postfix_wizard/Postfix.pm
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-06-03 13:25:37 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-06-03 13:25:37 +0000
commit4872c954e2340d1ed8460488e53b8fc351c4e117 (patch)
tree9d950a3d4abd893c0394ddf14302eb242f9d4fbd /postfix_wizard/Postfix.pm
parent52a4d1dba26fc9fa5dcadc3418abc430b78bb881 (diff)
downloaddrakwizard-4872c954e2340d1ed8460488e53b8fc351c4e117.tar
drakwizard-4872c954e2340d1ed8460488e53b8fc351c4e117.tar.gz
drakwizard-4872c954e2340d1ed8460488e53b8fc351c4e117.tar.bz2
drakwizard-4872c954e2340d1ed8460488e53b8fc351c4e117.tar.xz
drakwizard-4872c954e2340d1ed8460488e53b8fc351c4e117.zip
add newbie/expoert mode, various other fix
Diffstat (limited to 'postfix_wizard/Postfix.pm')
-rwxr-xr-xpostfix_wizard/Postfix.pm30
1 files changed, 22 insertions, 8 deletions
diff --git a/postfix_wizard/Postfix.pm b/postfix_wizard/Postfix.pm
index 9b17a683..a659d4bb 100755
--- a/postfix_wizard/Postfix.pm
+++ b/postfix_wizard/Postfix.pm
@@ -105,10 +105,14 @@ my %type = (
2 => N("Relay mail server"),
);
+my %understanding = (
+ 1 => N('Newbie - classical options'),
+ 2 => N('Expert - advanced options'),
+ );
$o->{pages} = {
welcome => {
- name => N("Internet mail configuration wizard") . "\n\n" . N("This wizard will help you configure an mail server for your network, or configure an mail relay."),
+ name => N("Internet mail configuration wizard") . "\n\n" . N("This wizard will help you configure an Postifx mail server for your network, or a Postfix mail relay."),
no_back => 1,
pre => sub {
if (-f $wiz_postfix_etc) {
@@ -121,7 +125,7 @@ $o->{pages} = {
},
post => sub {
if ($o->{var}{wiz_type} == 2) {
- return 'main_server' ;
+ return 'understanding' ;
} else {
return 'relay_server';
}
@@ -129,8 +133,15 @@ $o->{pages} = {
data => [
{ label => N("What do you want to do:"), val => \$o->{var}{wiz_level}, list => [ keys %type ], format => sub { $type{$_[0]} } },
],
- next => 'relay_server',
+ next => 'understanding',
},
+ understanding => {
+ name => N('Now i need to know your undestanding in Samba server configuration'),
+ data => [
+ { label => N("What kind of user are you:"), val => \$o->{var}{wiz_understanding}, list => [ keys %understanding ], format => sub { $understanding{$_[0]} } },
+ ],
+ next => 'main_server',
+ },
main_server => {
name => N("Mail server") . "\n" . N("This should be chosen consistently with the address you use for incoming mail.") . "\n\n" . N("Address masquerading is a method to hide all hosts inside a domain behind their mail gateway, and to make it appear as if the mail comes from the gateway itself, instead of from individual machines."),
pre => sub {
@@ -193,15 +204,19 @@ $o->{pages} = {
{ label => N("myorigin:"), fixed_val => \$o->{var}{wiz_myorigin} },
],
post => \&do_it_relay_server,
- next => 'end_relay'
+ next => 'end'
},
summary_main => {
name => N("The wizard will now configure your mail server."),
post => \&do_it_main_server,
next => 'end'
},
- end_relay => {
- name => N("Congratulations") . "\n\n" . N("The wizard successfully configured your relay mail server."),
+ end => {
+ name => N("Congratulations") . "\n\n" . N("The wizard successfully configured your Mail server."),
+ post => sub {
+ store_postfix_type($o->{var}{wiz_type});
+ },
+ no_back => 1,
end => 1,
next => 0
},
@@ -267,7 +282,7 @@ sub postfix_options {
$o->{var}{wiz_relay_domains} and $postfix->{wiz_relay_domains} = $o->{var}{wiz_relay_domains};
}
-sub store_samba_type {
+sub store_postfix_type {
# write config file to store Postfix type
my ($type) = @_;
output($wiz_postfix_etc, <<EOF);
@@ -279,7 +294,6 @@ EOF
append_to_file($wiz_postfix_etc, "type=$type\n");
}
-
sub check_relay {
$o->{var}{wiz_ext_mail_relay} or return 'warning';
$o->{var}{wiz_ext_mail_relay} =~ /(\S+)\.(\S+)$/ or return 'warning';