Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv20295
Modified Files:
Bayes.pm
Log Message:
keep filename variable static across classify_and_modify
Index: Bayes.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v
retrieving revision 1.158
retrieving revision 1.159
diff -C2 -d -r1.158 -r1.159
*** Bayes.pm 2 Jul 2003 09:50:14 -0000 1.158
--- Bayes.pm 4 Jul 2003 03:55:00 -0000 1.159
***************
*** 1099,1103 ****
# Add the XPL header
! $temp_file =~ s/.*\/([^\/]+)/$1/;
my $xpl = '';
--- 1099,1104 ----
# Add the XPL header
! my $nopath_temp_file = $temp_file;
! $nopath_temp_file =~ s/.*\/([^\/]+)/$1/;
my $xpl = '';
***************
*** 1105,1109 ****
$xpl .= "http://";
$xpl .= $self->module_config_( 'html', 'local' )?"127.0.0.1":$self->config_( 'hostname' );
! $xpl .= ":" . $self->module_config_( 'html', 'port' ) . "/jump_to_message?view=$temp_file$eol";
if ( $self->global_config_( 'xpl' ) && ( $self->{parameters__}{$classification}{quarantine} == 0 ) ) {
--- 1106,1110 ----
$xpl .= "http://";
$xpl .= $self->module_config_( 'html', 'local' )?"127.0.0.1":$self->config_( 'hostname' );
! $xpl .= ":" . $self->module_config_( 'html', 'port' ) . "/jump_to_message?view=$nopath_temp_file$eol";
if ( $self->global_config_( 'xpl' ) && ( $self->{parameters__}{$classification}{quarantine} == 0 ) ) {
***************
*** 1136,1140 ****
print $client 'X-POPFile-Link: ' . $xpl if ( $self->global_config_( 'xpl' ) );
print $client "MIME-Version: 1.0$eol";
! print $client "Content-Type: multipart/report; boundary=\"$temp_file\"$eol$eol--$temp_file$eol";
print $client "Content-Type: text/plain$eol$eol";
print $client "POPFile has quarantined a message. It is attached to this email.$eol$eol";
--- 1137,1141 ----
print $client 'X-POPFile-Link: ' . $xpl if ( $self->global_config_( 'xpl' ) );
print $client "MIME-Version: 1.0$eol";
! print $client "Content-Type: multipart/report; boundary=\"$nopath_temp_file\"$eol$eol--$nopath_temp_file$eol";
print $client "Content-Type: text/plain$eol$eol";
print $client "POPFile has quarantined a message. It is attached to this email.$eol$eol";
***************
*** 1146,1150 ****
print $client "The first 20 words found in the email are:$eol$eol";
print $client $self->{parser__}->first20();
! print $client "$eol--$temp_file$eol";
print $client "Content-Type: message/rfc822$eol$eol";
}
--- 1147,1151 ----
print $client "The first 20 words found in the email are:$eol$eol";
print $client $self->{parser__}->first20();
! print $client "$eol--$nopath_temp_file$eol";
print $client "Content-Type: message/rfc822$eol$eol";
}
|