Subject: bug#6908: 24.0.50; RMAIL sending fails in some case

From: john ffitch <[email-masked]>
Date: Wed, 25 Aug 2010 13:25:08 +0100

There is a certain kind of e-mail that gives rise to broken emails in
reply.  This has been the case for a while, but I have only just had
it happen when i have time.  I am using RMAIL mode for reading an d
sending mail.

Example message is
------------------------------------------------------------------------
>From movemail Tue Aug 24 19:15:21 2010
Delivery-date: Tue, 24 Aug 2010 16:02:37 +0100
Content-class: urn:content-classes:message
Return-Receipt-To: "ALS, Adrian" <[email-masked]>
Disposition-Notification-To: "ALS, Adrian" <[email-masked]>
Subject: Important: External Examiner (University of the West Indies, Cave Hill Campus)
Date: Tue, 24 Aug 2010 11:01:20 -0400
Priority: Urgent
Importance: high
From: "ALS, Adrian" <[email-masked]>
To: <[email-masked]>

This is a multi-part message in MIME format.

------_=_NextPart_001_01CB439D.3692AE5E
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Dear Prof. Fitch,

=20

I called your office today but you weren't in. It has become apparent
.....
------_=_NextPart_001_01CB439D.3692AE5E
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">

.......

</html>

------_=_NextPart_001_01CB439D.3692AE5E--

------------------------------------------------------------------------
If I use r to reply to this References get appended to the To field
and mangled.  If I copy the References to after the Subject it works.
The problem always happens with references or similar unexpected
fields

Hard tpo show what it does while composingf a message but the nmessage
that gets sent says inter alia

Date: Wed, 25 Aug 2010 12:59:59 +0100
From: john ffitch <[email-masked]>
To: "ALS, Adrian" <[email-masked]>
    <[email-masked]>
    ([email-masked])
Subject: Re: Important: External Examiner (University of the West Indies,
    Cave Hill Campus)

and after hard "correction" says

From: john ffitch <[email-masked]>
To: "ALS, Adrian" <[email-masked]>
Subject: Re: Important: External Examiner (University of the West Indies,
    Cave Hill Campus)
References:
    <[email-masked]>
    <[email-masked]>

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/home/jpff/GNU_21/emacs/trunk/etc/DEBUG.

In GNU Emacs 24.0.50.22 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2010-08-20 on harvey
Windowing system distributor `The X.Org Foundation', version 11.0.10800000
configured using `configure  'CFLAGS=-g -O2 -fno-optimize-sibling-calls''

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

Major mode: RMAIL

Minor modes in effect:
  auto-image-file-mode: t
  show-paren-mode: t
  display-time-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
d d d n SPC d SPC d SPC <up> r I SPC d o SPC n o t 
SPC u n d e r s t a n d SPC t h i s SPC c o n c e n 
t r a t i o n SPC o n SPC P y t h o n . SPC SPC <backspace> 
<backspace> SPC SPC E v e n SPC l e s s SPC r e a s 
o n SPC t o SPC u s e SPC <help-echo> <down-mouse-1> 
<mouse-1> C-v C-v <down-mouse-1> <mouse-movement> <mouse-movement> 
<drag-mouse-1> <help-echo> <down-mouse-2> <mouse-2> 
SPC <next> <backspace> C-c C-c SPC <return> d d SPC 
d SPC d SPC d SPC d SPC SPC n SPC d SPC d SPC t f <down-mouse-1> 
<mouse-1> C-k C-k C-e <return> C-x TAB . s i <backspace> 
<backspace> <backspace> C-x i . s i <tab> <return> 
<up> C-d <down> <down> <down> <down-mouse-1> <mouse-movement> 
<mouse-movement> <drag-mouse-1> C-w <down-mouse-1> 
<mouse-1> C-a C-l C-l C-v C-v <next> <prior> <prior> 
<prior> <down-mouse-1> <mouse-1> C-v <down-mouse-1> 
<mouse-1> C-x k <return> SPC o <return> d C-x C-f S 
P A <tab> <return> <backspace> 3 C-x C-s C-x b <return> 
SPC SPC SPC SPC SPC SPC SPC d s y C-x b * m <tab> <backspace> 
<backspace> m a <tab> <return> C-x C-f C-g C-x b * 
m <tab> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
C-g C-x C-b <down> <return> p p r <down-mouse-1> <mouse-1> 
C-l C-k C-k C-k C-k C-k C-k C-n C-n C-n C-n C-y <down-mouse-1> 
<mouse-1> ( s e c o n d SPC a t t e m p t ) <return> 
<return> <down-mouse-2> <mouse-2> C-k C-k C-k C-c C-c 
<return> M-x r e p o <tab> r t <tab> <return>

Recent messages:
Invalid face reference: my-trailing-space-face [2 times]
Invalid face reference: my-tab-face
Invalid face reference: my-trailing-space-face [2 times]
Invalid face reference: my-tab-face
Invalid face reference: my-trailing-space-face [2 times]
Invalid face reference: my-tab-face [2 times]
Invalid face reference: my-trailing-space-face [2 times]
Invalid face reference: my-tab-face [2 times]
Invalid face reference: my-trailing-space-face [2 times]
Invalid face reference: my-tab-face

Load-path shadows:
/home/jpff/GNU_21/local-lisp/autotest-mode hides /usr/local/share/emacs/site-lisp/autotest-mode
/home/jpff/GNU_21/local-lisp/autoconf-mode hides /usr/local/share/emacs/site-lisp/autoconf-mode
/home/jpff/GNU_21/local-lisp/scroll-lock hides /home/jpff/GNU_21/emacs/trunk/lisp/scroll-lock
/home/jpff/GNU_21/local-lisp/t-mouse hides /home/jpff/GNU_21/emacs/trunk/lisp/t-mouse
/home/jpff/GNU_21/local-lisp/ruler-mode hides /home/jpff/GNU_21/emacs/trunk/lisp/ruler-mode
/home/jpff/GNU_21/local-lisp/emerge hides /home/jpff/GNU_21/emacs/trunk/lisp/vc/emerge
/home/jpff/GNU_21/local-lisp/url-gw hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-gw
/home/jpff/GNU_21/local-lisp/url-file hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-file
/home/jpff/GNU_21/local-lisp/url-cid hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-cid
/home/jpff/GNU_21/local-lisp/url-parse hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-parse
/home/jpff/GNU_21/local-lisp/url-cache hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-cache
/home/jpff/GNU_21/local-lisp/url-http hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-http
/home/jpff/GNU_21/local-lisp/url-misc hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-misc
/home/jpff/GNU_21/local-lisp/url hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url
/home/jpff/GNU_21/local-lisp/url-auth hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-auth
/home/jpff/GNU_21/local-lisp/url-ldap hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-ldap
/home/jpff/GNU_21/local-lisp/url-news hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-news
/home/jpff/GNU_21/local-lisp/url-vars hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-vars
/home/jpff/GNU_21/local-lisp/url-cookie hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-cookie
/home/jpff/GNU_21/local-lisp/url-nfs hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-nfs
/home/jpff/GNU_21/local-lisp/url-ns hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-ns
/home/jpff/GNU_21/local-lisp/url-irc hides /home/jpff/GNU_21/emacs/trunk/lisp/url/url-irc
/home/jpff/GNU_21/local-lisp/remember hides /home/jpff/GNU_21/emacs/trunk/lisp/textmodes/remember
/home/jpff/GNU_21/local-lisp/socks hides /home/jpff/GNU_21/emacs/trunk/lisp/net/socks

Features:
(shadow emacsbug mule-util ebuff-menu electric rfc822 newcomment
edmacro kmacro rmailout etach mime-compose mail-alias-menu rmailkwd
rmail multi-isearch parse-time vc-cvs cc-mode cc-fonts cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs help-mode debug
ispell feedmail mailabbrev mailalias mailcrypt mail-extr mail-utils
comint ring sendmail eldoc package image-file logger crypt crypt++
crypt+pgp-pub paren cal-julian uniquify advice help-fns advice-preload
view cal-china cal-bahai cal-islam cal-hebrew lunar solar cal-dst appt
diary-lib diary-loaddefs holidays hol-loaddefs regexp-opt cal-menu
easymenu calendar cal-loaddefs time tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev loaddefs button minibuffer faces cus-face files text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process
dynamic-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)

==John ffitch