summaryrefslogtreecommitdiffstats
path: root/postfix_wizard
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2004-03-12 10:50:49 +0000
committerAntoine Ginies <aginies@mandriva.com>2004-03-12 10:50:49 +0000
commit697a15d0adde2a746a9514522e57971a19dddea1 (patch)
tree1f7fd8ac0642cb2b61da5dfe25f4f49547e9ebcd /postfix_wizard
parent73005846b52575021bf318dc81bb44bd98654348 (diff)
downloaddrakwizard-697a15d0adde2a746a9514522e57971a19dddea1.tar
drakwizard-697a15d0adde2a746a9514522e57971a19dddea1.tar.gz
drakwizard-697a15d0adde2a746a9514522e57971a19dddea1.tar.bz2
drakwizard-697a15d0adde2a746a9514522e57971a19dddea1.tar.xz
drakwizard-697a15d0adde2a746a9514522e57971a19dddea1.zip
fix pb of relayhost
Diffstat (limited to 'postfix_wizard')
-rwxr-xr-xpostfix_wizard/Postfix.pm35
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 '$_'");
}