Newsgroups: bit.listserv.mailbook
Date:         Wed, 30 Sep 1992 11:02:05 EDT
From:         "Duane D. Weaver" <WEAVER@OHSTVMA.BITNET>
Subject:      Re: Forward substitute Xedit

On Mon, 28 Sep 1992 12:14:11 LCL Bob Jones said:
>I'd be interested in locating and receiving an XEDIT to use with
>RiceMail that would act like the FORWARD function, except that it
>would copy the entire old message, including headers, as harmless text
>into a new SENDable message.  The objective is to disable all of the
>original from, sender, resent-xx information in the header.
>
>You guessed it -- When I forward messages, the recipients usually
>end up replying to a list and not me...to everyone's embarrassment!
From the archives of MAILBOOK for Aug 1990.

Enjoy....../duane  (note that the following was ENCAPsulated)
                   (mail containing the exec follows the first mail)
------------------------------
=========================================================================
Date:         Thu, 30 Aug 90 17:30:26 +0200
Reply-To:     MAIL/MAILBOOK subscription list <MAILBOOK@DEARN>
From:         "Alain FONTAINE (Postmaster - NAD)" <af@SEI.UCL.AC.BE>
Subject:      Re: remailing/forwarding

On Wed, 29 Aug 90 15:32:57 CDT Marty Hoag said:
>   But I would really like a third option for handling received mail.  One
>that would totally encapsulize the received mail in the TEXT of the mail
>being created with a bit of white space just before the note.  That would
>be especially nice for postmasters and such.  In other words - it would
>be like a combination of send (with new subject), and forward (with
>all headers and text included below the ---Original Message--- line
>just as they were received...
>       Marty
What I usually do :
       - go to top of message
       - put * r r a3
       - send or reply, depending on circumstances
       - encaps r r
'encaps' is a XEDIT macro to perform mail encapsulation according to rfc
934 (one that' fully and univoquely undoable).                   /AF
------------------------------
Date:         Mon, 3 Sep 90 10:49:29 +0200
Reply-To:     MAIL/MAILBOOK subscription list <MAILBOOK@DEARN>
From:         "Alain FONTAINE (Postmaster - NAD)" <af@SEI.UCL.AC.BE>
Subject:      Re: remailing/forwarding

On Thu, 30 Aug 90 13:27:49 EDT Duane D. Weaver said:
>Is 'encaps' available somewhere?
Oh yes, right here.... 8-)                      /AF



- ------------------------------
/* */
trace o
parse upper arg fn ft fm .
if fn='?'|fn='' then do
  say 'ENCAPS fn (ft (fm) )'
  say '       =   =   ='
  say '       *   *   *'
  say 'Encapsulate the target file, according to the RFC934 proposal,'
  say 'after the current line.'
  exit
end
parse value left(fn,8) left(ft,8) with fn ft .
'COMMAND EXTRACT /FNAME/FTYPE/FMODE/'
parse value fname.1 ftype.1 fmode.1 with dfn dft dfm .
if fn=''|fn='='|fn='*' then fn = dfn
if ft=''|ft='='|ft='*' then ft = dft
if fm=''|fm='='|fm='*' then fm = dfm
parse value vf(fn ft fm) with vrc msg
if vrc<>0 then do
  'COMMAND EMSG DIG'msg
  exit vrc
end
'COMMAND EXTRACT /LINE/ZONE/STAY/EOF/SPILL/MSGMODE'
startline = line.1
if eof.1='ON' then startline = startline-1
'COMMAND SET MSGMODE OFF'
'COMMAND SET SPILL OFF'
'COMMAND SET STAY OFF'
'COMMAND GET' fn ft fm
if rc=0  then do
  sep = copies('-',30)
  'COMMAND EXTRACT /LINE'
  lastline = line.1
  'COMMAND LOCATE :'startline+1
  'COMMAND SET ZONE 1 *'
  'COMMAND CLOCATE -*'
  'COMMAND CLOCATE -^/ /'
  if rc=0 then do
    'COMMAND EXTRACT /CURLINE/'
    dosep = left(curline.3,1)<>'-'|left(curline.3,3)='- -'
  end
  else dosep = 1
  'COMMAND LOCATE :'startline
  if dosep then do
    'COMMAND INPUT' sep
    lastline = lastline+1
  end
  'COMMAND NEXT'
  'COMMAND SET ZONE 1 1'
  'COMMAND CHANGE /-/- -/ :'lastline+1
  'COMMAND SET ZONE 1 *'
  'COMMAND CLOCATE *'
  'COMMAND CLOCATE ^/ /'
  if rc=0 then do
    'COMMAND EXTRACT /CURLINE/'
    dosep = left(curline.3,1)<>'-'|left(curline.3,3)='- -'
  end
  else dosep = 1
  'COMMAND LOCATE :'lastline
  if dosep then 'COMMAND INPUT' sep
end
'COMMAND SET MSGMODE' msgmode.1 msgmode.2
'COMMAND SET SPILL' spill.1
'COMMAND SET STAY' stay.1
'COMMAND SET ZONE' zone.1 zone.2
exit

vf: procedure
  parse upper arg fn ft fm .
  ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  if length(fm)>2|verify(left(fm,1),ch)>0|,
    verify(substr(fm,2,1,'1'),'0123456')>0 then
      return '24 048E Invalid mode '''fm'''.'
  nt = fn||ft
  x = verify(nt,ch'0123456789$#@+-:_')
  if x>0 then return '20 062E Invalid character '''substr(nt,x,1)'''',
    'in fileid '''fn ft fm'''.'
return 0
------------------------------
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU