From 697a15d0adde2a746a9514522e57971a19dddea1 Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Fri, 12 Mar 2004 10:50:49 +0000 Subject: fix pb of relayhost --- postfix_wizard/Postfix.pm | 35 +++++++++++++++++++++-------------- 1 file 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 '$_'"); } -- cgit v1.2.1