🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.misc
Article #5408

Re: Can I use the "filter" program? Probably.

#5408
From: Mitchell Wyle
Date: Mon, 05 Jun 1989 10:21
57 lines
2766 bytes
In article <14320@pasteur.Berkeley.EDU> 
dheller@cory.Berkeley.EDU.UUCP (Dan Heller) writes:
>In article <1989Jun1.193715.908@ateng.ateng.com> 
>chip@ateng.ateng.com (Chip Salzenberg) writes:
>> According to jeff@cjsa.WA.COM (Jeffery Small):
>> >I am running smail 2.5 under elm and need to automatically forward a set of
>> >mail messages which match a certain pattern, to another site.  Is there any
>> 
>> IMHO, a better solution is the "deliver" program, which by some mysterious

What's IMHO?

>Why is a separte program necessary?  

Because I interpret Jeff's request to mean he wants the mail forwarded
when it arrives, *not* when he starts his mail reader.

>to issues like this.  but in mush, all you have to do is:
>
>pick -s "pattern" | mail -f <address>
>
>This forwards all messages matching a particular pattern to another site.
>Dan Heller	<island!argv@sun.com>

If Jeff can live with the messages' being forwarded only after he starts
his mailer, you could do it in BSD mail, mailx, elm, mush, mm, mh, m6,
vi, ... or whatever.  If he wants smail to forward the messages for
him, all he needs is a .forward file.  See the man page forward(5) and
the docs which come with smail.  It always surprizes me how many people
re-invent what .forward does.

BTW:  I recommend that Jeff use the "forward" system which comes with elm.
      I think smail will read his .forward file to start elm's filter
      program.

Something like:

   ~/.forward
      |"bin/DoMail ; exit 0"

   ~/bin/DoMail
      trap /bin/rm -f $f
      f=/tmp/DM_$$
      cat > $f
      ANS=`egrep "pattern1|pattern2|pattern3" $f
      if [ "$ANS"x != x ]; then
        /usr/ucb/mail jeff@grimble.toad.over.under.bang.slam.bam.edu < $f
      fi
      /bin/rm -f $f

[m6 is: Mitch's Minimal Mail Message Manipulatin Mechanism, a long, slow
 set of vi macros The project is dying because mush is getting so damn
 good].
-- 
-Mitchell F. Wyle
Institut fuer Informationssysteme         wyle@inf.ethz.ch 
ETH Zentrum / 8092 Zurich, Switzerland    +41 1 256 5237
Technical Details
Message-ID: <259@ethz-inf.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!cernvax!ethz!ethz-inf!wyle
References: <778@cjsa.WA.COM> <1989Jun1.193715.908@ateng.ateng.com> <14320@pasteur.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!cernvax!ethz!ethz-inf!wyle
From: wyle@inf.ethz.ch (Mitchell Wyle)
Newsgroups: comp.mail.misc,comp.mail.elm,comp.mail.mush
Subject: Re: Can I use the "filter" program?  Probably.
Summary: delivery time verus interactive reader(s)
Keywords: elm filter smail sendmail
Message-ID: <259@ethz-inf.UUCP>
Date: 5 Jun 89 10:21:09 GMT
References: <778@cjsa.WA.COM> <1989Jun1.193715.908@ateng.ateng.com> <14320@pasteur.Berkeley.EDU>
Reply-To: wyle@inf.ethz.ch (Mitchell Wyle)
Followup-To: comp.mail.misc
Organization: Departement fuer Informatik, ETH Zuerich
Lines: 57