summaryrefslogtreecommitdiffstats
path: root/postfix_wizard/Postfix.pm
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-06-06 07:31:48 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-06-06 07:31:48 +0000
commit1c687ee8618526c643cbd8cd1fd088777efe4ffb (patch)
tree25f8012b521641cad5e3dbc5532d4b80ac643c11 /postfix_wizard/Postfix.pm
parentd9a12ac3090d26768fcf855fb9c302804f367e7b (diff)
downloaddrakwizard-1c687ee8618526c643cbd8cd1fd088777efe4ffb.tar
drakwizard-1c687ee8618526c643cbd8cd1fd088777efe4ffb.tar.gz
drakwizard-1c687ee8618526c643cbd8cd1fd088777efe4ffb.tar.bz2
drakwizard-1c687ee8618526c643cbd8cd1fd088777efe4ffb.tar.xz
drakwizard-1c687ee8618526c643cbd8cd1fd088777efe4ffb.zip
various fix, debug
Diffstat (limited to 'postfix_wizard/Postfix.pm')
-rwxr-xr-xpostfix_wizard/Postfix.pm80
1 files changed, 37 insertions, 43 deletions
diff --git a/postfix_wizard/Postfix.pm b/postfix_wizard/Postfix.pm
index 109641a2..074908f1 100755
--- a/postfix_wizard/Postfix.pm
+++ b/postfix_wizard/Postfix.pm
@@ -2,9 +2,10 @@
# Drakwizard
-# Copyright (C) 2002, 2003 Mandrakesoft
+# Copyright (C) 2002, 2005 Mandrakesoft
#
-# Authors: Arnaud Desmons <adesmons@mandrakesoft.com>
+# Authors: Antoine Giniès <aginies at mandriva.com>
+# Arnaud Desmons <adesmons@mandrakesoft.com>
# Florent Villard <warly@mandrakesoft.com>
#
# This program is free software; you can redistribute it and/or modify
@@ -74,15 +75,12 @@ my $o = {
wiz_readme_directory => '',
wiz_masquerade_domains => '',
- wiz_default_destination_concurrency_limit => '',
wiz_content_filter => '',
- wiz_smtp_amavis_destination_concurrency_limit => '',
wiz_html_directory => '',
wiz_content_filter => '',
wiz_receive_override_options => '',
wiz_mail_masquerade => '',
- wiz_ext_mail_relay => '',
wiz_relayhost => '',
wiz_relay_domains => '',
},
@@ -113,12 +111,12 @@ my @yesorno = qw(yes no); push @yesorno, "";
$o->{pages} = {
welcome => {
- 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."),
+ name => N("Internet mail configuration wizard") . "\n\n" . N("This wizard will help you configure a Postifx mail server or a Postfix mail relay."),
no_back => 1,
pre => sub {
$postfix->{relayhost} and $o->{var}{wiz_type} = 2;
if (-f $wiz_postfix_etc) {
- $::in->ask_warn(N("Information"), N("It seems you previously setup a Postfix server. This wizard will re-read your old configuration, and show you the Postfix server type you choose"));
+ $::in->ask_warn(N("Information"), N("It seems you previously setup a Postfix configuration. This wizard will re-read your old configuration, and show you the Postfix server type you choose"));
my $data = cat_($wiz_postfix_etc);
# detect old Postfix type
my ($old_type) = $data =~ /type=(\d)/;
@@ -169,27 +167,25 @@ $o->{pages} = {
},
},
main_server => {
- name => N('Main Postfix server'),
+ name => N('Main Postfix server') . "\n\n" . N('helo_required: require that a remote SMTP client introduces itself at the beginning of an SMTP session with the HELO or EHLO command.') . "\n" . N('Verify command: this stops some techniques used to harvest email addresses.'),
pre => sub {
$o->{var}{wiz_smtpd_helo_required} ||= $postfix->{smtpd_helo_required};
$o->{var}{wiz_disable_vrfy_command} ||= $postfix->{disable_vrfy_command};
- #smtpd_recipient_restrictions
- # smtpd_data_restrictions
},
data => [
- { label => N('helo required:'), val => \$o->{var}{wiz_smtpd_helo_required}, fixed_list => \@yesorno, help => '' },
- { label => N('Disable verify command:'), val => \$o->{var}{wiz_disable_vrfy_command}, fixed_list => \@yesorno, help => '' },
+ { label => N('helo required:'), val => \$o->{var}{wiz_smtpd_helo_required}, fixed_list => \@yesorno },
+ { label => N('Disable verify command:'), val => \$o->{var}{wiz_disable_vrfy_command}, fixed_list => \@yesorno },
],
next => 'message_config',
},
relay_server => {
- name => N('Relay server'),
+ name => N('Relay server') . N(''),
pre => sub {
$o->{var}{wiz_relayhost} ||= $postfix->{relayhost};
- $postfix->{relay_domains} and $o->{var}{wiz_relay_domains} = $postfix->{relay_domains} or $o->{var}{wiz_relay_domains} = "mydomain.com";
+ $postfix->{relay_domains} and $o->{var}{wiz_relay_domains} = $postfix->{relay_domains} or $o->{var}{wiz_relay_domains} = $wiz_domain_name;
},
data => [
- { label => N('Relay host:'), val => \$o->{var}{wiz_relayhost}, help => '192.168.10.13' },
+ { label => N('Relay host:'), val => \$o->{var}{wiz_relayhost}, help => 'ie: 192.168.10.13' },
{ label => N('Relay domains:'), val => \$o->{var}{wiz_relay_domains}, help => 'mydomain.com' },
],
next => 'message_config',
@@ -213,34 +209,31 @@ $o->{pages} = {
network_config => {
name => N('Network config'),
pre => sub {
- if ($postfix->{inet_interfaces}) {
- $o->{var}{wiz_inet_interfaces} = $postfix->{inet_interfaces};
- } else {
- $o->{var}{wiz_inet_interfaces} = 'all';
- }
- $postfix->{mydestination} and $o->{var}{wiz_mydestination} = $postfix->{mydestination};
+ $postfix->{inet_interfaces} and $o->{var}{wiz_inet_interfaces} = $postfix->{inet_interfaces} or $o->{var}{wiz_inet_interfaces} = 'all';
+ $postfix->{mydestination} and $o->{var}{wiz_mydestination} = $postfix->{mydestination} or $o->{var}{wiz_mydestination} = "\$myhostname, localhost.\$mydomain";
$postfix->{mynetworks} and $o->{var}{wiz_mynetworks} = $postfix->{mynetworks};
$o->{var}{wiz_mynetworks_style} ||= $postfix->{mynetworks_style};
},
data => [
- { label => N('inet interfaces:'), val => \$o->{var}{wiz_inet_interfaces}, help => N('all') },
- { label => N('my destination:'), val => \$o->{var}{wiz_mydestination}, help => N('$myhostname, localhost.$mydomain, /etc/postfix/destinations') },
- { label => N('my networks:'), val => \$o->{var}{wiz_mynetworks}, help => N('127.0.0.0/32, 192.168.1.0/24') },
+ { label => N('inet interfaces:'), val => \$o->{var}{wiz_inet_interfaces}, help => N('The network interface addresses that this mail system receives mail on. By default, the software claims all active interfaces on the machine. ie: all') },
+ { label => N('my destination:'), val => \$o->{var}{wiz_mydestination}, help => N('The list of domains that are delivered via the $local_transport mail delivery transport. ie: $myhostname, localhost.$mydomain, /etc/postfix/destinations') },
+ { label => N('my networks:'), val => \$o->{var}{wiz_mynetworks}, help => N('The list of trusted SMTP clients. ie: 127.0.0.0/32, 192.168.1.0/24') },
],
next => 'message_config',
},
message_config => {
- name => N('Message options'),
+ name => N('Message options') . N('Various options to configure your message queue, delay, size...'),
pre => sub {
- $postfix->{maximal_queue_lifetime} and $o->{var}{wiz_maximal_queue_lifetime} = $postfix->{maximal_queue_lifetime};
- $postfix->{message_size_limit} and $o->{var}{wiz_message_size_limit} = $postfix->{message_size_limit};
+ $postfix->{maximal_queue_lifetime} and $o->{var}{wiz_maximal_queue_lifetime} = $postfix->{maximal_queue_lifetime} or $o->{var}{wiz_maximal_queue_lifetime} = "5d";
+ $postfix->{message_size_limit} and $o->{var}{wiz_message_size_limit} = $postfix->{message_size_limit} or $o->{var}{wiz_message_size_limit} = "5000";
+ $o->{var}{wiz_delay_warning_time} ||= $postfix->{delay_warning_time} or $postfix->{delay_warning_time} = "2h";
},
data => [
- { label => N('Maximal queue life'), val => \$o->{var}{wiz_maximal_queue_lifetime} },
- { label => N('Message size limit'), val => \$o->{var}{wiz_message_size_limit} },
- { label => N('Default destination concurrency limit'), val => \$o->{var}{wiz_default_destination_concurrency_limit}, help => N('How many parallel deliveries to the same user or domain ?') },
+ { label => N('Maximal queue life:'), val => \$o->{var}{wiz_maximal_queue_lifetime}, help => N('Determines how long a message should stay in the queue before it is deemed undeliverable. The default is five days (5d)') },
+ { label => N('Message size limit:'), val => \$o->{var}{wiz_message_size_limit}, help => N('Maximum size of a message in Kb') },
+ { label => N('Delay warning time:'), val => \$o->{var}{wiz_delay_warning_time}, help => N('The delay_warning_time specifies after how many hours a warning is sent that mail has not yet been delivered.') },
],
- next => 'summary_main',
+ next => 'network_config',
},
error_sendmail => {
name => N("Error, sendmail is installed. Please remove it before installing or configuring Postfix"),
@@ -251,17 +244,21 @@ $o->{pages} = {
summary_relay => {
name => N("Configuring your relay mail server") . "\n\n" . N("The wizard collected the following parameters needed to configure your relay mail server:") . "\n\n" . N("To accept these values, and configure your server, click the next button or use the back button to correct them."),
data => [
- { label => N("Internet mail gateway:"), fixed_val => \$o->{var}{wiz_ext_mail_relay} },
- { label => N("Form of the address:"), fixed_val => \$o->{var}{wiz_mail_masquerade} },
- { label => N("myorigin:"), fixed_val => \$o->{var}{wiz_myorigin} },
+ { label => N('Relay host:'), fixed_val => \$o->{var}{wiz_relayhost} },
+ { label => N('Relay domains:'), fixed_val => \$o->{var}{wiz_relay_domains} },
],
post => \&do_it_relay_server,
next => 'end'
},
summary_main => {
- name => N("The wizard will now configure your mail server."),
- post => \&do_it_main_server,
- next => 'end'
+ name => N("The wizard will now configure your Postfix mail server."),
+ data => [
+ { label => N('inet interfaces:'), fixed_val => \$o->{var}{wiz_inet_interfaces} },
+ { label => N('my destination:'), fixed_val => \$o->{var}{wiz_mydestination} },
+ { label => N('my networks:'), fixed_val => \$o->{var}{wiz_mynetworks} },
+ ],
+ post => \&do_it_main_server,
+ next => 'end'
},
end => {
name => N("Congratulations") . "\n\n" . N("The wizard successfully configured your Postfix Mail server."),
@@ -303,8 +300,10 @@ sub postfix_options {
$o->{var}{wiz_inet_interfaces} and $postfix->{inet_interfaces} = $o->{var}{wiz_inet_interfaces};
$o->{var}{wiz_mydestination} and $postfix->{mydestination} = $o->{var}{wiz_mydestination};
$o->{var}{wiz_mynetworks} and $postfix->{mynetworks} = $o->{var}{wiz_mynetworks};
+
$o->{var}{wiz_smtpd_helo_required} and $postfix->{smtpd_helo_required} = $o->{vawiz_smtpd_helo_required};
$o->{var}{wiz_disable_vrfy_command} and $postfix->{disable_vrfy_command} = $o->{var}{wiz_disable_vrfy_command};
+
$o->{var}{wiz_smtpd_recipient_restrictions} and $postfix->{smtpd_recipient_restrictions} = $o->{var}{wiz_smtpd_recipient_restrictions};
$o->{var}{wiz_smtpd_data_restrictions} and $postfix->{smtpd_data_restrictions} = $o->{var}{wiz_smtpd_data_restrictions};
$o->{var}{wiz_maximal_queue_lifetime} and $postfix->{maximal_queue_lifetime} = $o->{var}{wiz_maximal_queue_lifetime};
@@ -318,14 +317,11 @@ sub postfix_options {
$o->{var}{wiz_mailq_path} and $postfix->{mailq_path} = $o->{var}{wiz_mailq_path};
$o->{var}{wiz_setgid_group} and $postfix->{setgid_group} = $o->{var}{wiz_setgid_group};
$o->{var}{wiz_masquerade_domains} and $postfix->{masquerade_domains} = $o->{var}{wiz_masquerade_domains};
- $o->{var}{wiz_default_destination_concurrency_limit} and $postfix->{default_destination_concurrency_limiwiz_default_destination_concurrency_limit} = $o->{var}{wiz_default_destination_concurrency_limit};
- $o->{var}{wiz_content_filter} and $postfix->{content_filter} = $o->{var}{wiz_content_filter};
- $o->{var}{wiz_smtp_amavis_destination_concurrency_limit} and $postfix->{wiz_smtp_amavis_destination_concurrency_limit} = $o->{var}{wiz_html_directory};
+
$o->{var}{wiz_html_directory} and $postfix->{wiz_html_directory} = $o->{var}{wiz_html_directory};
$o->{var}{wiz_content_filter} and $postfix->{wiz_content_filter} = $o->{var}{wiz_content_filter};
$o->{var}{wiz_receive_override_options} and $postfix->{wiz_receive_override_options} = $o->{var}{wiz_receive_override_options};
$o->{var}{wiz_mail_masquerade} and $postfix->{wiz_mail_masquerade} = $o->{var}{wiz_mail_masquerade};
- $o->{var}{wiz_ext_mail_relay} and $postfix->{wiz_ext_mail_relay} = $o->{var}{wiz_ext_mail_relay};
$o->{var}{wiz_relayhost} and $postfix->{wiz_relayhost} = $o->{var}{wiz_relayhost};
$o->{var}{wiz_relay_domains} and $postfix->{wiz_relay_domains} = $o->{var}{wiz_relay_domains};
}
@@ -386,7 +382,6 @@ sub do_it_relay_server {
$postfix->{relayhost} and delete $postfix->{relayhost};
$o->{var}{wiz_mail_masquerade};
- $o->{var}{wiz_ext_mail_relay};
$o->{var}{wiz_myhostname};
$o->{var}{wiz_mydomain};
$o->{var}{wiz_inet_interfaces};
@@ -421,7 +416,6 @@ sub do_it_main_server {
$postfix->{virtual_maps};
$postfix->{canonical_maps};
$o->{var}{wiz_myorigin} and $postfix->{myorigin} = $o->{var}{wiz_myorigin};
- $o->{var}{wiz_ext_mail_relay} and $postfix->{relayhost} = $o->{var}{relayhost};
my @conf = ("myhostname = $wiz_host_name",
'inet_interfaces = $myhostname,localhost',