Author: varkoly Date: Tue Dec 9 16:36:45 2008 New Revision: 54004 URL: http://svn.opensuse.org/viewcvs/yast?rev=54004&view=rev Log: fix bnc#450888 changing VSCount have to been detected Modified: trunk/mail/src/YaPI/MailServer.pm trunk/mail/src/mail-server_dialogs.ycp Modified: trunk/mail/src/YaPI/MailServer.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/YaPI/MailServer.pm?rev=54004&r1=54003&r2=54004&view=diff ============================================================================== --- trunk/mail/src/YaPI/MailServer.pm (original) +++ trunk/mail/src/YaPI/MailServer.pm Tue Dec 9 16:36:45 2008 @@ -1167,13 +1167,13 @@ my $smtp = SCR->Execute('.mail.postfix.mastercf.findService', { 'service' => 'smtp', 'command' => 'smtpd'}); -#print "SMTP"; -#print Dumper ($smtp); -#print "VSCAN"; -#print Dumper ($vscan); +#print STDERR "SMTP"; +#print STDERR Dumper ($smtp); +#print STDERR "VSCAN"; +#print STDERR Dumper ($vscan); if( defined $smtp->[0] && defined $smtp->[0]->{'options'} ) { - if( $smtp->[0]->{'options'}->{'content_filter'} eq 'smtp:[localhost]:10024' && $vscan ) + if( $smtp->[0]->{'options'}->{'content_filter'} eq 'smtp:[127.0.0.1]:10024' && $vscan ) { $MailPrevention{'VirusScanning'} = YaST::YCP::Boolean(1); if( ! open(IN,$aconf) ) @@ -1232,6 +1232,7 @@ } y2milestone("-- WriteMailPrevention --"); + #print STDERR Dumper( $MailPrevention ); # Make LDAP Connection my $ldapMap = $self->ReadLDAPDefaults($AdminPassword); if( !$ldapMap ) @@ -1393,7 +1394,7 @@ if( ref($smtps) eq 'ARRAY' && defined $smtps->[0]->{options} ) { my $opts = $smtps->[0]->{options}; - $opts->{'content_filter'} = 'smtp:[localhost]:10024'; + $opts->{'content_filter'} = 'smtp:[127.0.0.1]:10024'; SCR->Execute('.mail.postfix.mastercf.modifyService', { 'service' => 'smtps', 'command' => 'smtpd', @@ -2785,6 +2786,8 @@ $TMP->{'Changed'} = 1; $TMP->{'BasicProtection'} = 'medium'; $TMP->{'VirusScanning'} = 1; + $TMP->{'VSCount'} = 2; + $TMP->{'SpamLearning'} = 0; $self->WriteMailPrevention($TMP,$AdminPassword); #Setup Mail Server Relaying @@ -2909,7 +2912,12 @@ my $ismax = 0; foreach my $l ( @ACONF ) { - $ismax = 1 if $l =~ s/^\$max_servers = \d+/\$max_servers = $VSCount/; + if ( $l =~ s/^\$max_servers = .*;/\$max_servers = $VSCount;/ ) + { + #fix bnc#450888 : remove the supplementary entries + next if $ismax; + $ismax = 1; + } $l =~ s/(.*)/# $1/ if $l =~ /bypass_virus_checks_acl.*=.*qw\( \./; if( $isclam || $l =~ /Clam Antivirus-clamd/ ) { Modified: trunk/mail/src/mail-server_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/mail-server_dialogs.ycp?rev=54004&r1=54003&r2=54004&view=diff ============================================================================== --- trunk/mail/src/mail-server_dialogs.ycp (original) +++ trunk/mail/src/mail-server_dialogs.ycp Tue Dec 9 16:36:45 2008 @@ -703,7 +703,7 @@ term content = `VBox ( `Left(`CheckBox (`id(`VirusScanning), `opt(`notify), _("Start Virus Scanner AMAVIS"), VirusScanning)), `VSpacing (1), - `Left(`IntField (`id(`VSCount), _("Count of Virsus Scanner Process"), 1,50,VSCount)), + `Left(`IntField (`id(`VSCount), `opt(`notify), _("Count of Virsus Scanner Process"), 1,50,VSCount)), `VSpacing (1), SpamL, `VSpacing (1), @@ -1420,7 +1420,7 @@ content = MailTransportsDialog(); helptext = HELPS["MailTransports"]:"Bla Bla Bla"; } else if(FocusedContent == "MailPrevention") { - if(ret == `VirusScanning || ret == "off" || ret == "medium" || ret == "hard") { + if(ret == `VSCount || ret == `VirusScanning || ret == "off" || ret == "medium" || ret == "hard") { MailServer::MailPrevention["Changed"] = true; continue; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org