Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!ames!lll-winken!uunet!mcvax!inria!axis!coms!axis!philip From: philip@axis.fr (Philip Peake) Newsgroups: comp.mail.elm Subject: Re: Problem with messages starting with blanks Message-ID: <543@axis.fr> Date: 5 Jun 89 10:43:19 GMT References: <583@Aragorn.dde.dk> Organization: Axis International, Paris Lines: 87 In article <583@Aragorn.dde.dk>, tpo@dde.dk (Thomas Peter Sonne Olesen) writes: > If I recieve a message from my local system written with the standard > mail program, and the message start with blanks my mailfile > (/usr/mail/tpo) will look like this: > --------------------------------------------- > From xyz Sun Jun 4 00:57 DST 1989 > A message line starting with blanks > > ------------------------------------------------ > > elm count the number of lines in the message correctly in the menu, > but when i read the message elm only shows a blank screen. > > If I quit elm without deleting the message elm add the Status line, > after the message line which cause the mail file to look like: > --------------------------------------------- > From abc Sun Jun 4 00:57 DST 1989 > A message line starting with blanks > Status: RO > > ------------------------------------------------ > It looks like elm treat the message line as a part of the header. > > Can any one explain this to me. > Is it elm or mail that handle this wrong. Yes I can explain it. It is a small problem with elm. To understand the problem, you need to know a little about RFC822. Mail messages consist of two parts; headers and the message. The headers are in a standard format, as defined by RFC822. A minimum header would be something like: From: Philip Peake To: Somone Subject: Some subject There are various other header which can be included. Some of these may be quite long, and so RFC822 allows header lines to be continued. The continuation is done by putting white space at the beginning of the continuation line: From: Philip Peake To: Somone Subject: Some subject The above is a valid header, with the To: line continued over two lines. The end of the headrs is signified by an empty line. Now, the difficult part. In order to transmit the messages between machines, it is often nessecary to put the message into an "envelope". in the case of a uucp transfer, the envelope consists simply of a line of the form: From user date remote from site or From user date Note that the From doesn't have : after it - this is NOT part of the RFC822 headers. The unix mail system needs the From_ line to seperate the messages in the mailbox. Your problem is that elm reads the From_ line as being part of the RFC822 header, and so when it finds the message following with white space at the front, assumes it is part of the headers, and so doesn't show it (use the 'h' command and you will see it). Trying to modify elm to cope with this would be non-trivial. My only suggestion is to: 1) Use elm to send all mail - train users not to use 'mail'. 2) If you MUST use mail, don't indent the first line, or, put a blank line as the first line. I know this isn't a solution, but maybe it will help ? Philip