Hello list,
I'm adding in support for f-prot. I started with a copy of sophie,
and only had to make a few minor modifications to get it to work.
However. f-prot may "sanitize" an email, so you feed it a filename
and a "new name", and it scans the file and writes the clean copy back
to "new name".
My quesion is: can I rename the file ok? Anyone see a problem with
code like this:
if ( ($xcode == 3) || ($xcode == 6) || ($xcode == 8) ) {
$self->log( LOGERROR, "One or more virus(es) found: $message" );
if ( lc( $self->{"_fprot"}->{"deny_viruses"} ) eq "yes" ) {
return ( DENY, "Virus scan: $message");
}
else {
unlink($filename);
move($newfile, $filename);
$transaction->header->add( 'X-Virus-Found', 'Yes' );
$transaction->header->add( 'X-Virus-Details', $message );
return (DECLINED);
}
}
Once I get it working ok, I'd be happy to submit it. Would it be best
to email it to the list, to a maintainer? Or check it in someplace?
-Andy