Bug 13922 - mail corrupts the header
Summary: mail corrupts the header
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mailx
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Florian La Roche
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-07-13 22:14 UTC by crozierm
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-08-10 09:35:01 UTC
Embargoed:


Attachments (Terms of Use)

Description crozierm 2000-07-13 22:14:51 UTC
Hello,

This problem is present in mailx-8.1.1-8 to mailx-8.1.1-10, which kindof
leads me to believe its my fault.  However, even will all configuration
files removed/defaulted, it still occurs, so without further ado.....

when 'mail' is run and it rewrites the messages in the spool directory, it
inserts a blank line into the header of the message. This new blank
indicates "hey, the message body starts here!" and other mail readers (I
tested with pine and via imap) are deprived of the rest of the header
information.

Here is my little example:

This is my spool file after I received a message
-------------------------------------------------------------------

[crozierm@consumption crozierm]$ cat /var/spool/mail/crozierm 
From crozierm Thu Jul 13 15:08:33 2000
>From crozierm  Thu Jul 13 15:08:33 2000
Received: from www.sight-n-sound.com ([198.107.30.99])
        by consumption.net with esmtp (Exim 3.15 #16)
        id 13Cr9k-0003Uv-00
        for crozierm; Thu, 13 Jul 2000 15:08:32 -0700
Received: by www.sight-n-sound.com (Postfix, from userid 179)
        id 8E55529BB5; Thu, 13 Jul 2000 15:05:50 -0700 (PDT)
To: crozierm
Subject: I can't get no
Content-Length: 13
Message-Id: <20000713220550.8E55529BB5.com>
Date: Thu, 13 Jul 2000 15:05:50 -0700 (PDT)
From: crozierm (Michael Crozier)

satisfaction

[crozierm@consumption crozierm]$ 
----------------------------------------------------------------
So the header is fully intact when I first receive the message.  Now, lets
invoke the mail command
----------------------------------------------------
[crozierm@consumption crozierm]$ mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/spool/mail/crozierm": 1 message 1 new
>N  1 crozierm@sight-n-sou  Thu Jul 13 15:08  17/644   "I can't get no"
& q
Held 1 message in /var/spool/mail/crozierm
[crozierm@consumption crozierm]$ 
------------------------------------------------------------------------
Now that mail has touched it, lets see what it looks like:
-------------------------------------------------------------------------
[crozierm@consumption crozierm]$ cat /var/spool/mail/crozierm 
From crozierm Thu Jul 13 15:08:33 2000
Status: O

>From crozierm  Thu Jul 13 15:08:33 2000
Received: from www.sight-n-sound.com ([198.107.30.99])
        by consumption.net with esmtp (Exim 3.15 #16)
        id 13Cr9k-0003Uv-00
        for crozierm; Thu, 13 Jul 2000 15:08:32 -0700
Received: by www.sight-n-sound.com (Postfix, from userid 179)
        id 8E55529BB5; Thu, 13 Jul 2000 15:05:50 -0700 (PDT)
To: crozierm
Subject: I can't get no
Content-Length: 13
Message-Id: <20000713220550.8E55529BB5.com>
Date: Thu, 13 Jul 2000 15:05:50 -0700 (PDT)
From: crozierm (Michael Crozier)

satisfaction

[crozierm@consumption crozierm]$ 
-------------------------------------------------------------------------
Uh oh!  Now there is a space between the  "Status" line and the ">From"
line.  Lets see what Pine thinks about that
-------------------------------------------------------------------------
+    69 Jul 13 bugzilla    (787) Your Bugzilla
password.              
  N  70                             
(603)                                      
                          [No more messages in folder]
? Help       < FldrList   P PrevMsg       - PrevPage D Delete     R
Reply       
O OTHER CMDS > [ViewMsg]  N NextMsg     Spc NextPage U Undelete   F
Forward    
--------------------------------------------------------------------------
Notice how the last message has no sender or subject?  What do you suppose
that is?  Well, everything makes sense when we look at the body and find
out that this information is there (ie after the blank line) rather than in
the header
---------------------------------------------------------------------------
  PINE 4.21   MESSAGE TEXT             Folder: INBOX  Message 70 of 70 ALL
NEW  


>From crozierm  Thu Jul 13 15:08:33 2000
Received: from www.sight-n-sound.com ([198.107.30.99])
        by consumption.net with esmtp (Exim 3.15 #16)
        id 13Cr9k-0003Uv-00
        for crozierm; Thu, 13 Jul 2000 15:08:32 -0700
Received: by www.sight-n-sound.com (Postfix, from userid 179)
        id 8E55529BB5; Thu, 13 Jul 2000 15:05:50 -0700 (PDT)
To: crozierm
Subject: I can't get no
Content-Length: 13
Message-Id: <20000713220550.8E55529BB5.com>
Date: Thu, 13 Jul 2000 15:05:50 -0700 (PDT)
From: crozierm (Michael Crozier)

satisfaction




? Help       < MsgIndex   P PrevMsg       - PrevPage D Delete     R
Reply       
O OTHER CMDS > ViewAttch  N NextMsg     Spc NextPage U Undelete   F
Forward

Comment 1 Alan Cox 2000-07-14 23:44:00 UTC
>From blah is not a valid header field. mail was given wrong input. Now a better
question
is how did it get there and what wrote it in the first place. What mailers and
MTA do
you use and what triggered this originally. I think you need to work out how it
got there
and add a bug to the cause not the effect., although mailx shouldnt be so picky.




Comment 2 Derek Tattersall 2000-08-04 15:34:20 UTC
I can't reproduce this with mailx-8.1.1-14, using the plain vanilla
installation.

Comment 3 Hugh Bragg 2000-08-10 09:34:59 UTC
I'm not sure if this is related but AFAIK applies to only the
mailx-8.1.1-16.i386.rpm package. on RH 6.2
After upgrading my mailx program from mailx-8.1.1-10, when I use mail to read my
mail it core dumps while attempting to save mail to mbox. 
I had to downgrade before it would work properly.
All other security updates have been applied and no error are apparent.


Comment 4 Jeff Johnson 2000-08-11 18:39:14 UTC
This report seems to describe a symptom of a MTA problem rather than a mailx
problem
(please open bugs for other problems like the segfault separately, although I
believe
you are seeing bug #15728 in action).


Note You need to log in before you can comment on or make changes to this bug.