[yast-commit] r54362 - /trunk/mail/src/YaPI/MailServer.pm
Author: varkoly Date: Mon Jan 5 13:22:54 2009 New Revision: 54362 URL: http://svn.opensuse.org/viewcvs/yast?rev=54362&view=rev Log: the myhostname must be set to FQHN Modified: trunk/mail/src/YaPI/MailServer.pm Modified: trunk/mail/src/YaPI/MailServer.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/YaPI/MailServer.pm?rev=54362&r1=54361&r2=54362&view=diff ============================================================================== --- trunk/mail/src/YaPI/MailServer.pm (original) +++ trunk/mail/src/YaPI/MailServer.pm Mon Jan 5 13:22:54 2009 @@ -2917,8 +2917,10 @@ my @ACONF = <IN>; close(IN); - my $isclam = 0; - my $ismax = 0; + my $isclam = 0; + my $ismax = 0; + my $ismyhostname = 0; + my $myhostname = `hostname -f`; foreach my $l ( @ACONF ) { if ( $l =~ s/^\$max_servers = .*;/\$max_servers = $VSCount;/ ) @@ -2927,6 +2929,12 @@ next if $ismax; $ismax = 1; } + if ( $l =~ s/^\$myhostname = .*;/\$myhostname = $myhostname;/ ) + { + #fix bnc#450888 : remove the supplementary entries + next if $ismyhostname; + $ismyhostname = 1; + } $l =~ s/(.*)/# $1/ if $l =~ /bypass_virus_checks_acl.*=.*qw\( \./; if( $isclam || $l =~ /Clam Antivirus-clamd/ ) { @@ -2944,6 +2952,10 @@ { push @CONF, '$max_servers = '.$VSCount; } + if( !$ismyhostname ) + { + push @CONF, '$myhostname = '.$myhostname; + } if( ! open(OUT,">$aconf.new") ) { return "Error: $!"; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
varkoly@svn.opensuse.org