diff options
Diffstat (limited to 'postfix_wizard')
-rwxr-xr-x | postfix_wizard/Postfix.pm | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/postfix_wizard/Postfix.pm b/postfix_wizard/Postfix.pm index d7cd17ee..4e268057 100755 --- a/postfix_wizard/Postfix.pm +++ b/postfix_wizard/Postfix.pm @@ -230,20 +230,27 @@ sub do_it_internal { my $w = $in->wait_message(N("Postfix Server"), N("Configuring your Postfix server.....")); save_config(); my @conf = ("myhostname = $wiz_host_name", - 'inet_interfaces = $myhostname,localhost', - 'mydestination = $myhostname, localhost.$mydomain', - 'alias_maps = hash:/etc/postfix/aliases', - 'alias_database = hash:/etc/postfix/aliases', - 'virtual_maps = hash:/etc/postfix/virtual', - 'canonical_maps = hash:/etc/postfix/canonical', - "mydomain = $wiz_domain_name", - "masquerade_domains = $wiz_domain_name", - ); -# example of internal mail working confoguration -#myhostname = xp2400.guibland.com -#virtual_maps = hash:/etc/postfix/virtual -#canonical_maps = hash:/etc/postfix/canonical -#masquerade_domains = guibland.com + 'inet_interfaces = $myhostname,localhost', + 'mydestination = $myhostname, localhost.$mydomain', + 'alias_maps = hash:/etc/postfix/aliases', + 'alias_database = hash:/etc/postfix/aliases', + 'virtual_maps = hash:/etc/postfix/virtual', + 'canonical_maps = hash:/etc/postfix/canonical', + "mydomain = $wiz_domain_name", + "masquerade_domains = $wiz_domain_name", + "myorigin = $o->{var}{wiz_myorigin}", + ); + my $c = "/etc/postfix/main.cf"; + if (any { /relayhost/ } cat_($c)) { + substInFile { + s/relayhost.*//g; + } $c; + } + # example of internal mail working confoguration + #myhostname = xp2400.guibland.com + #virtual_maps = hash:/etc/postfix/virtual + #canonical_maps = hash:/etc/postfix/canonical + #masquerade_domains = guibland.com foreach (@conf) { system("/usr/sbin/postconf -e '$_'"); } |