summaryrefslogtreecommitdiffstats
path: root/postfix_wizard/Postfix.pm
diff options
context:
space:
mode:
Diffstat (limited to 'postfix_wizard/Postfix.pm')
-rwxr-xr-xpostfix_wizard/Postfix.pm16
1 files changed, 7 insertions, 9 deletions
diff --git a/postfix_wizard/Postfix.pm b/postfix_wizard/Postfix.pm
index 9e04696f..46991f39 100755
--- a/postfix_wizard/Postfix.pm
+++ b/postfix_wizard/Postfix.pm
@@ -83,7 +83,13 @@ $o->{pages} = {
pre => sub {
$o->{var}{wiz_mail_masquerade} ||= get_mail_masquerade();
},
- post => \&check_masquerade,
+ complete => sub {
+ print "in is $::in\n";
+ if ($o->{var}{wiz_mail_masquerade} !~ /\w+\.\w+$/) {
+ $::in->ask_warn(N("Error"), N("Masquerade should be a valid domain name such as \"mydomain.com\"!"));
+ return 1;
+ }
+ },
data => [
{ label => N("Masquerade domain name:"), val => \$o->{var}{wiz_mail_masquerade} },
],
@@ -93,10 +99,6 @@ $o->{pages} = {
name => N("Warning:") . "\n\n" . N("You entered an empty address for the mail gateway.") . "\n\n" . N("Your choice can be accepted, but this will not allow you to send mail outside your local network. Press next to continue, or back to enter a value."),
next => 'summaryext',
},
- masquerade_not_good => {
- name => N("Error.") . "\n\n" . N("Masquerade not good!"),
- next => 'external'
- },
error_sendmail => {
name => N("Error, sendmail is installed, please remove it before install and configure Postfix"),
no_back => 1,
@@ -172,10 +174,6 @@ sub check_sendmail {
undef $w;
}
-sub check_masquerade {
- $o->{var}{wiz_mail_masquerade} or return 'masquerade_not_good';
- $o->{var}{wiz_mail_masquerade} =~ /\w+\.\w+$/ or return 'masquerade_not_good';
-}
sub check_relay {
$o->{var}{wiz_ext_mail_relay} or return 'warning';