Subject: 24.0.90; Gnus shows junk text at the beginning of some emails

From: Dmitri Paduchikh <[email-masked]>
Date: Thu, 20 Oct 2011 13:36:06 +0600

Hello,

In the attachment is a message which is displayed in Gnus with some junk
text at the beginning. It appears that the problem is in the header
X-Ham-Report. Removing this header in the incoming email fixes the
problem for me (it does not appear in further messages). This is a
header containing technical information and some unencoded UTF-8
characters (U+FFFD to be precise). Here it is with all U+FFFD characters
replaced by `?'.

~~~~~~~~~~~
X-Ham-Report: Spam detection software, running on the system
 "server2.ultrahost.us", has identified this incoming email as possible spam. 
 The original message has been attached to this so you can view it (if it
 isn't spam) or label similar future email.  If you have any questions, see
 the administrator of that system for details. Content preview:  ???????????.
 > ?? ???? ??????? ??????????? ?? ????????? ? ?????????? ??????? RHVoice?
 ?????? ??? ? ?????????. ???????? ??? ??????????? ??? ??????? ?????? ??????.
 ???? ?????????? ?????? ??????????? ?? 5 ??????, ?? ???????? ??????????
 ???????? ?????? ?????? ?????. [...] Content analysis details:   (-0.4 points,
 8.0 required) pts rule name              description ----
 ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
 trust [94.100.176.154 listed in list.dnswl.org] 0.0 FREEMAIL_FROM         
 Sender email is commonly abused enduser mail provider
 (georgiexxx-146[at]mail.ru) 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from
 freemail username ends in digit (georgiexxx-146[at]mail.ru) -1.9 BAYES_00    
           BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 1.4 AWL    
                AWL: From: address is in the auto white-list
~~~~~~~~~~~
I also have mangled the sender address a bit in order to protect it from
spamming. But this shouldn't make any difference. For me it looks like
Gnus misdetects the start of message body due to this header.

D. Paduchikh

In GNU Emacs 24.0.90.1 (i386-unknown-linux-gnu, GTK+ Version 2.24.7)
 of 2011-10-20 on ait
configured using `configure  '--prefix=/opt/emacs' '--program-suffix=-24''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: C
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: C
  value of $LANG: ru_RU.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t