[gnu.emacs.bug] rmail loses invalid mail files

jeff1@garfield.mun.edu (Jeff Sparkes) (04/15/89)

Version: emacs 18.53 (RISC/os on MIPS 120 and probably others)

	If rmail doesn't recognize any messages in a file, it 
ends up with a file with only a babyl header.  If the file happened to
be the system mailbox, it is now gone, without even an hint except
"No new mail has arrived."  Even the ".newmail" file is gone.  This was 
found out the hard way, when we had a sendmail problem which didn't put 
"From " at the start of the mailbox.
	If rmail doesnt recognize the format of the file, it should probably
leave it be and just issue a warning.

jbw@bucsf.bu.edu (04/16/89)

jeff1@garfield.mun.edu (Jeff Sparkes) writes:
>	If rmail doesn't recognize any messages in a file, it 
>ends up with a file with only a babyl header.  If the file happened to
>be the system mailbox, it is now gone, without even an hint except
>"No new mail has arrived."  Even the ".newmail" file is gone.  This was 
>found out the hard way, when we had a sendmail problem which didn't put 
>"From " at the start of the mailbox.
>	If rmail doesnt recognize the format of the file, it should probably
>leave it be and just issue a warning.

This code in rmail.el is to blame:

	      ;;This is a kludge, in case we're wrong about mmdf not
	      ;;allowing anything in between.  If it loses, we'll have
	      ;;to look for something else
	      (t (delete-char 1)))))

Essentially, if it doesn't recognize any mail message starting
delimiters, it deletes the first character and tries again.  And
again.  And again.  :-)

More fun than allowed by law, don't you think?

--
Joe Wells <jbw@bucsf.bu.edu>
jbw%bucsf.bu.edu@bu-it.bu.edu
...!harvard!bu-cs!bucsf!jbw