MailScanner footers not signing Yahoo messages

David Hooton david at PLATFORMHOSTING.COM
Mon Apr 5 23:42:41 IST 2004


> -----Original Message-----
> From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK] On
> Behalf Of Julian Field
> Sent: Monday, 5 April 2004 9:13 PM
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: Re: MailScanner footers not signing Yahoo messages
>
> 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.
>


Hi Julian,

The patch doesn't seem to be working on the most recent stable release.

Output:
patching file Message.pm
Hunk #1 FAILED at 2421.
1 out of 1 hunk FAILED -- saving rejects to file Message.pm.rej

Message.pm.rej contains:

***************
*** 2421,2434 ****
     my @body = $top->bodyhandle->as_lines;

     # Output original data back into body, followed by message
-   my($line, $io);
     $io = $top->open("w");
     if ($MimeType =~ /text\/html/i) {
       $signature = $this->ReadVirusWarning('inlinehtmlsig');
       foreach $line (@body) {
-       $line =~ s/\<\/x?html\>/$signature$&/i;
         $io->print($line);
       }
       (($body[-1]||'') =~ /\n\Z/) or $io->print("\n"); # Ensure final
newline
     } else {
       foreach $line (@body) { $io->print($line) }; # Original body data
--- 2421,2436 ----
     my @body = $top->bodyhandle->as_lines;

     # Output original data back into body, followed by message
+   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) {
+       $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


Cheers!

David Hooton



========================================================================
 Pain free spam & virus protection by:          www.mailsecurity.net.au
 Forward undetected SPAM to:                   spam at mailsecurity.net.au
========================================================================



More information about the MailScanner mailing list