paul@devon.UUCP (Paul Sutcliffe Jr.) (01/12/88)
From the ENVIRONMENT section of Rnmail(1): MAILRECORD If defined, contains the name of a file to which the finished message will be appended. Default: message not saved This is a handy feature, resembling the 'set record=somefile' option of the BSD and Xenix mailers to record all outgoing mail. The problem is that Rnmail does not save the finished message in 'mailbox' format; e.g. there is no 'From ' header as the first line of each message. The nice thing about having the messages stored in mailbox format is that many mailers (Xenix mail, BSD Mail, elm and mush, to name a few) allow one to specify an alternate mailbox (or folder) for viewing. These mailers rely on the 'From ' header to separate messages. I have created a set of diffs (suitable for feeding to Patch) to patch Rnmail so that it will prepend an appropriate From line when saving messages. [I'm almost ashamed to say that the diffs are smaller than the explanation you've been reading so far. :-)] Note that I have chosen to emulate the method used by Elm and Mush to save messages: the sender's name is replaced by the string "TO:<recipient's name>"; for instance: From TO:john@doe.main Mon Jan 11 21:28:37 EST 1988 To install this patch, extract the rnmail.diffs file from the following shell archive, go to your Rn sources directory, and type 'patch < rnmail.diffs'. Then remake Rnmail. - paul #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # rnmail.diffs # This archive created: Mon Jan 11 21:02:32 1988 export PATH; PATH=/bin:$PATH echo shar: extracting "'rnmail.diffs'" '(706 characters)' if test -f 'rnmail.diffs' then echo shar: will not over-write existing file "'rnmail.diffs'" else sed 's/^X//' << \SHAR_EOF > 'rnmail.diffs' XIndex: Rnmail.SH XPrereq: 4.3.1.4 85/08/01 14:23:05 X*** .orig/Rnmail.SH Sun May 11 23:02:06 1986 X--- Rnmail.SH Sun Jan 10 13:21:12 1988 X*************** X*** 294,301 X case "${MAILRECORD-none}" in X none) X ;; X! *) if $cat $tmpart >> $MAILRECORD; then X! $echo "Article appended to $MAILRECORD" X else X $echo "Cannot append to $MAILRECORD" X fi X X--- 294,305 ----- X case "${MAILRECORD-none}" in X none) X ;; X! *) if $echo "From TO:$to `date`" >> $MAILRECORD; then X! if $cat $tmpart >> $MAILRECORD; then X! $echo "Article appended to $MAILRECORD" X! else X! $echo "Cannot append to $MAILRECORD" X! fi X else X $echo "Cannot append to $MAILRECORD" X fi SHAR_EOF if test 706 -ne "`wc -c < 'rnmail.diffs'`" then echo shar: error transmitting "'rnmail.diffs'" '(should have been 706 characters)' fi fi # end of overwriting check # End of shell archive exit 0 -- Paul Sutcliffe, Jr. UUCP (smart): paul@devon.UUCP UUCP (dumb): ...{rutgers,ihnp4,cbosgd}!bpa!vu-vlsi!devon!paul