V4: Attachment Warning Filename =

Julian Field mailscanner at ecs.soton.ac.uk
Fri Oct 11 16:59:08 IST 2002


At 15:41 11/10/2002, you wrote:
>At 15:31 11/10/2002, you wrote:
>>In mailscanner.conf, one can name the Attachment Warning Filename.
>>Would it be possible to use this variable in the inline.warning.txt/html
>>files where it says:
>>
>>         Please read the "VirusWarning.txt"...
>>
>>It would be easier to use the variable there, than changing the two
>>inline.warning files to be consistent with what the "Attachment Warning
>>Filename =" says the attachment is named.
>
>Good thinking, Batman!
>I'll change it in V4.

It will be in the next release, but if you want it now, apply this patch to
Message.pm and then use
         $viruswarningname
in your inline.warning.* report files.

---
/usr/src/redhat/SOURCES/mailscanner-4.00.0a13/bin/MailScanner/Message.pm
Fri Oct 11 00:39:32 2002
+++ Message.pm  Fri Oct 11 17:06:19 2002
@@ -1198,6 +1198,10 @@
    my($option) = @_;

    my $filename = MailScanner::Config::Value($option, $this);
+  my $viruswarningname =
MailScanner::Config::Value('attachmentwarningfilename',
+                                                    $this);
+  my($line);
+
    #print STDERR "Reading virus warning message from $filename\n";
    my $fh = new FileHandle;
    $fh->open($filename)
@@ -1207,7 +1211,13 @@

    my $result = "";
    while (<$fh>) {
-    $result .= $_;
+    chomp;
+    s#"#\\"#g;
+    s#@#\\@#g;
+    # Boring untainting again...
+    /(.*)/;
+    $line = eval "\"$1\"";
+    $result .= $line . "\n";
    }
    $fh->close();
    $result;

--
Julian Field                Teaching Systems Manager
jkf at ecs.soton.ac.uk         Dept. of Electronics & Computer Science
Tel. 023 8059 2817          University of Southampton
                             Southampton SO17 1BJ



More information about the MailScanner mailing list