--- qmail-scanner-queue.pl.org Sun Nov 25 20:16:55 2001 +++ qmail-scanner-queue.pl Mon Nov 26 09:22:37 2001 @@ -145,7 +145,7 @@ #improvement :-) -my $mimeunpacker_binary='/usr/local/bin/reformime '; +my $mimeunpacker_binary='/usr/local/bin/ripmime '; my $unzip_binary='/usr/bin/unzip'; my $unzip_options=''; my $tnef_binary=''; @@ -263,8 +263,8 @@ -if ($mimeunpacker_binary =~ /reformime/) { - $mimeunpacker_binary .= " -x$scandir/$file_id/"; +if ($mimeunpacker_binary =~ /ripmime/) { + $mimeunpacker_binary .= " -d $scandir/$file_id/"; } @@ -493,8 +493,9 @@ my $save_filename =''; my ($new_filename,$MAYBETNEF,$tnef_status); - &debug("d_m: starting $mimeunpacker_binary <$scandir/$wmaildir/new/$file_id [",&deltatime,"]"); - open(MIME,"$mimeunpacker_binary <$scandir/$wmaildir/new/$file_id|")||&tempfail("cannot call mimeunpacker - $!"); +&debug("d_m: starting $mimeunpacker_binary -i $scandir/$wmaildir/new/$file_id [",&deltatime,"]"); +open(MIME,"$mimeunpacker_binary -i $scandir/$wmaildir/new/$file_id|")||&tempfail("cannot call mimeunpacker - $!"); + close(MIME)||&tempfail("cannot close mimeunpacker - $!"); my $unpacker=''; @@ -619,12 +620,12 @@ #append any ORIGINAL uuencoded filenames to this directory array #so that perlscanner can match on uuencoded filenames foreach $file (@allfiles,@uufile_list,@zipfile_list) { - #skip files that reformime generates. + #skip files that ripmime generates. #This will potentially allow baddies to smuggle files through #by using filenames like this... Nothing can be done about that:-( - #Reformime generates filenames of the form: - # attachmentsX.dat and 967067231.24320-X.host.name (where X is a number) - if ($file =~ /^attachment[0-9]+\.dat$|^[0-9]+\.[0-9]+\-[0-9]+\.|^$file_id/) { + #Ripmime generates filenames of the form: + # textfileX (where X is a number) + if ($file =~ /^textfile[0-9]+/) { &debug("p_s: skipping auto-generated file $file"); $ps_skipfile=1; } else {