🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #189164

Re: mail digest format 2

#189164
From: Kyle Jones
Date: Sat, 20 Apr 1991 21:04
37 lines
2212 bytes
kgk@CS.BROWN.EDU (Keiji Kanazawa) writes:
 > Thanks, everybody, for pointers or copies of the rfc describing mail
 > digest format.  It has become clear that what I need is an English
 > version of the specs, since I am only fronting for people who will
 > take one look at the rfc and throw it out the window.  [That's not to
 > imply that people who sent me the rfc wouldn't be similarly inclined]
 > 
 > Anyhow, request #2: does anybody have a succinct English description
 > of the digest format, or better yet, know where to get an automatic
 > mail digester?

The format is simple--- the RFC is just longwinded about it,
although it isn't as nearly as bad as some of the other RFCs.

A digest contains an optional prologue, a message separator, one
or more RFC 822 messages followed by message separators, and an
optional epilogue.

The prologue and epilogue can be any text as long as they don't
contain a message separator.  A message separator is any line
whose first character is a '-' and whose second character in not
a space (ASCII character 32).  If a message to be included in the
digest contains lines that begins with a '-', each such line should
be prepended with a '-' and a space before being included in the
digest.  (This allows a digest to be included in another digest).

That's all you really need to know.

This script will take a UNIX mailbox on stdin and output
an RFC 934 digest on stdout.

#!/bin/sh

sed -e '/^$/{' -e 'n' -e 's/^From .*$/-----/' -e '}' \
    -e '1s/^From .*$/----- start of digest -----/' -e 't' -e 's/^-/- -/'

echo "----- end of digest -----"
Technical Details
Message-ID: <129689@uunet.UU.NET>
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!kyle
References: <9104171740.AA09318@hookipa.cs.brown.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,73202d47123938de
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1991-04-20 14:43:07 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!kyle
From: kyle@uunet.UU.NET (Kyle Jones)
Newsgroups: gnu.emacs.help
Subject: Re: mail digest format 2
Message-ID: <129689@uunet.UU.NET>
Date: 20 Apr 91 21:04:00 GMT
References: <9104171740.AA09318@hookipa.cs.brown.edu>
Organization: UUNET Communications Services, Falls Church, VA
Lines: 37