You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Robert Nicholson <ro...@gmail.com> on 2007/02/15 05:52:32 UTC

This relies on an honest content type.

So I've got a message

who's body is quoted printable as in chinese

but this method

sub check_for_faraway_charset {
   my ($self, $body) = @_;

   my $type = $self->get('Content-Type');

   my @locales = $self->get_my_locales();

   return 0 if grep { $_ eq "all" } @locales;

   $type = get_charset_from_ct_line ($type);

   if (defined $type &&
     !Mail::SpamAssassin::Locales::is_charset_ok_for_locales
                     ($type, @locales))
   {
     # sanity check.  Some charsets (e.g. koi8-r) include the ASCII
     # 7-bit charset as well, so make sure we actually have a high
     # number of 8-bit chars in the body text first.

     $body = join("\n", @$body);
     if ($self->are_more_high_bits_set ($body)) {
       return 1;
     }
   }

   0;
}


never gets to it because it expects to find an illegal content type  
before it will go looking at the contents of the body.

note how they are honest about the charset for the meta. That's  
because they have to otherwise the HTML chinese
couldn't render correctly presumably.

message looks like this

Received: from [163.27.78.160] (helo=blogserver)
	by kermit.lizardhill.com with esmtp (Exim 4.62)
	(envelope-from <ee...@yahoo.com>)
	id 1HHY2y-0008jz-GV
	for robert@elastica.com; Wed, 14 Feb 2007 20:16:45 -0800
Received: from 163.27.78.160 ([58.61.139.39]) by blogserver with  
Microsoft SMTPSVC(6.0.3790.1830);
	 Thu, 15 Feb 2007 10:29:58 +0800
Received: from 18.82.90.228 by ; Thu, 15 Feb 2007 03:40:51 +0100
Message-ID: <AA...@yahoo.com>
From: "Jaime Holden" <ee...@yahoo.com>
Reply-To: "Jaime Holden" <ee...@yahoo.com>
To: robert@easy221.com.tw, robert@easynet.de, robert@ecosine.com.tw,  
robert@edirect168.com, robert@elastica.com,  
robert@enchantedisland.com, robert@ensae.fr, robert@ethome.net.tw,  
robert@excellence-sport.com, robert@extempo.com,  
robert@eyeconsultantspc.com, robert@fantascope.com,  
robert@fantawa.com, robert@fetnet.net, robert@fittobetriedbikes.com,  
robert@frankweb.de, robert@fstop.com.tw
Subject: Message subject
Date: Thu, 15 Feb 2007 06:36:51 +0400
X-Mailer: MIME-tools 5.503 (Entity 5.501)
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="--86695314414269261277"
X-Priority: 1
X-MSMail-Priority: High
X-OriginalArrivalTime: 15 Feb 2007 02:29:59.0914 (UTC) FILETIME= 
[30A4A4A0:01C750A9]
Lines: 36


----86695314414269261277
Content-Type: text/html;
Content-Transfer-Encoding: quoted-printable

<html>

<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dbig5">
<title>yahoo071601</title>
</head>

<body>

<p><strong>=B1M=B7~=B3n=C5=E9=A6X=BF=E8=B8=EA=B0T=AF=B8.=C5=FD=B1z=A4@=A 
6=
=B8=C1=CA=A8=AC=BB=DD=ADn=AA=BA</strong> </p>
<p>=A1=B8=BA=F4=B8=F4=B3=CC=A6=D1=A6r=B8=B9=A5=FA=BA=D0=A7=E5=B5o=A4=A4= 
A4=
=DF..=AB~=BD=E8=ABO=C3=D2</p>
<p>=BBO=C6W=B2=C4=A4@=AD=D3=BE=D6=A6=B3=B3=CC=B7s=A1B=B3=CC=B4=CE=A1B=B3 
=CC=
=ABK=A9y=AA=BA=B1M=B7~=B8=EA=B0T=AF=B8=A1C<br>
=A5=BB=AF=B8=BE=D6=A6=B3=B3=CC=B7s=B5 
{=A6=A1=A1B=B1=D0=BE=C7=A1B=B9C=C0=B8=
=A1B=A6=A8=A4H=B1=A1=A6=E2=A1B=B5=F8=C5=A5=AET=BC=D6,=C5=FD=A7A=B9=C4=AC 
=B0=
=C6[=A4=EE=A1C<br>

</p>
<p><a href=3D"http://www.yaho.to/tocd/">=A1=B8  
=BD=D0=AC=DD=B8=D4=B2=D3=A4=
=B6=B2=D0</a></p>
<p>---------=C4@=B1z=AF=E0=B3=DF=C5w</p>

</body>

</html>

----86695314414269261277--