MailScanner footers not signing Yahoo messages

Julian Field mailscanner at ecs.soton.ac.uk
Mon Apr 5 12:13:19 IST 2004


Well spotted. It was not signing the HTML portion of the message if the
HTML didn't end properly. Please try this patch to Message.pm. Works for me.

-----SNIP-----
--- Message.pm.old 2004-04-02 10:03:59.000000000 +0100
+++ Message.pm  2004-04-05 12:15:40.000000000 +0100
@@ -2421,14 +2421,16 @@
    my @body = $top->bodyhandle->as_lines;

    # Output original data back into body, followed by message
-  my($line, $io);
+  my($line, $io, $FoundHTMLEnd);
+  $FoundHTMLEnd = 0; # If there is no </html> tag, still append the signature
    $io = $top->open("w");
    if ($MimeType =~ /text\/html/i) {
      $signature = $this->ReadVirusWarning('inlinehtmlsig');
      foreach $line (@body) {
-      $line =~ s/\<\/x?html\>/$signature$&/i;
+      $FoundHTMLEnd = 1 if $line =~ s/\<\/x?html\>/$signature$&/i;
        $io->print($line);
      }
+    $io->print($signature . "\n") unless $FoundHTMLEnd;
      (($body[-1]||'') =~ /\n\Z/) or $io->print("\n"); # Ensure final newline
    } else {
      foreach $line (@body) { $io->print($line) }; # Original body data
-----SNIP-----

At 03:40 05/04/2004, you wrote:
>Hi All,
>
>I've just found a bug in the way that MailScanner signs Yahoo messages.
>Yahoo appears to deliver a multipart message with both the Text and HTML
>versions in the source, however MailScanner only signs the text content and
>not the html.  I've inserted message source below.
>
>Does anyone have any suggestions on how to fix this, or is it a bug?
>
>Cheers!
>
>Dave
>
>
> >From xxxxxx at yahoo.com.au Mon Apr 5 12:18:50 2004
>Return-Path: <xxxxxx at yahoo.com.au>
>Received: from web41414.mail.yahoo.com (web41414.mail.yahoo.com
>[66.218.93.80])
>by xxxx.xxxxxxxx.net.au (8.11.6/2.52a) with SMTP id i352IMf32671
>for <xxxx at xxxxxxxx.net.au>; Mon, 5 Apr 2004 12:18:22 +1000
>Message-ID: <20040405021815.25252.qmail at web41414.mail.yahoo.com>
>Received: from [xxx.xx.xxx.xx] by web41414.mail.yahoo.com via HTTP; Mon, 05
>Apr 2004 12:18:15 EST
>Date: Mon, 5 Apr 2004 12:18:15 +1000 (EST)
>From: =?iso-8859-1?q?David=20Hooton?= <xxxxxx at yahoo.com.au>
>Subject: Test Yahoo
>To: xxxx at xxxxxxxx.net.au
>MIME-Version: 1.0
>Content-Type: multipart/alternative;
>boundary="0-1276004888-1081131495=:24780"
>Content-Transfer-Encoding: 8bit
>X-MS: Message OK
>X-MS-SpamCheck: This message is unlikely to be spam,
>SPAM Database (score=-998.54, required 100, BAYES_00 -1000.00,
>HTML_MESSAGE 0.10, MK_BAD_HTML_04 0.30, MK_YAHOO_REDIR_01 0.16,
>MY_URI_REDIRECT 0.85, RM_ft_Iso8859 0.05, RM_rb_ANCHOR 0.00,
>RM_rb_BREAK 0.00, RM_rb_DIV 0.00, RM_rb_PARA 0.00)
>X-MS-From: xxxxxx at yahoo.com.au
>
>--0-1276004888-1081131495=:24780
>Content-Type: text/plain; charset=iso-8859-1
>Content-Transfer-Encoding: 8bit
>
>Testing 123
>
>
>
>---------------------------------
>Find local movie times and trailers on Yahoo! Movies.
>
>========================================================================
>Pain free spam & virus protection by: www.mailsecurity.net.au
>Forward undetected SPAM to: spam at mailsecurity.net.au
>========================================================================
>
>
>--0-1276004888-1081131495=:24780
>Content-Type: text/html; charset=iso-8859-1
>Content-Transfer-Encoding: 8bit
>
><DIV> Testing 123</DIV><p><br><hr size=1>
>Find local movie times and trailers on <a
>href="http://au.rd.yahoo.com/mail/tagline/*http://au.movies.yahoo.com"
>target=_blank><b>Yahoo! Movies.</b></a><br>
>
>--0-1276004888-1081131495=:24780--
>
>
>
>
>
>
>========================================================================
>  Pain free spam & virus protection by:          www.mailsecurity.net.au
>  Forward undetected SPAM to:                   spam at mailsecurity.net.au
>========================================================================

--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654



More information about the MailScanner mailing list