Thanks to all who replied (listed below).
Original request:
>| I'm looking for a vacation-like utility that will send the From:,
>| Subject: & Date: lines from my incoming mail to some other e-mail
>| address and leave the incoming mail in my mailbox.
Responses fell into two categories:
1. get procmail from
ftp://ftp.aist-nara.ac.jp/pub/misc/mail/filters/procmail
ftp://ftp.net.ohio-state.edu/pub/networking/mail/procmail
ftp://ftp.psg.com/pub/unix/procmail
ftp://hub.ucsb.edu/pub/mail (hand updated)
ftp://ftp.tamu.edu/pub/Unix/Mail (hand updated)
Or directly as:
ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/procmail.tar.gz
Special thanks to Jochen Bern who said:
>|That's pretty easy with procmail (which EVERYONE should use as local
>|Mailer for sendmail IMHO ;-) - here's a ~/.procmailrc Snippet that
>|should do the Trick:
>|
>|:0hc
>|| egrep '^(From|Subject|Date):' | mail vendor.jim@customer.site
>|
>|(where the first Line indicates "match the following 0 Conditions
>|and process the *h*eaders of a *c*arbon copy of the incoming Mail").
>|Of course, you can slip a Beautifier between the egrep and mail
>|Commands to prettyprint the Message like you suggested in your
>|Question.
2. write a script/program and use ~/.forward to send to myself and
pipe to the script/program.
Extra Special thanks to Stephen Harris who sent two scripts. This is
the second one:
>|Try this version. You run it from a .forward file (or an alias entry)
>|like this:
>|
>| "|/path/to/script jim@remote.site",\jim
>|
>|This will handle the local delivery to /var/mail/jim so we don't have
>|to worry about that, and the email address is in the forward entry, so
>|the same script can be used for many people. Even better, we no longer
>|need to keep a temporary file ... A much easier program!
>|
>|Remember - THIS IS UNTESTED CODE! It's been written especially for you :-)
>|
>|rgds
>|Stephen
>|
>| #!/bin/sh
>| # passed parameter is remote mailbox to send to
>| REMOTE_MAIL=$1
>|
>| (
>| echo To: $REMOTE_MAIL
>| echo Subject: Mail received
>| echo
>| echo You have received the following mail at HQ
>| echo
>| sed -n '1,/^$/p' | egrep '^(From|Subject|Date|Lines): '
>| ) | /bin/mail $REMOTE_MAIL
>| exit 0
I'm using the #2 approach for now, but checking out procmail is on my
to-do list.
-- Those who responded: Kevin.Sheehan@uniq.com.au Dan Pritts <danno@aa.fv.com> "Garry.Robbins" <25741@labatt.com> Stephen Harris <sweh@mpn.com> clarkson@uk.amgen.com Tim Fritz <tim@cfcg.er.usgs.gov> Gary Franczyk <franczyk@e-one.com> David Steiner <dsteiner@brynmawr.edu> Mark Bergman <bergman@phri.nyu.edu> Rasana Atreya <atreya@library.ucsf.edu> Jochen Bern <bern@TI.Uni-Trier.DE>________________________________________________________________________ Jim Englund Jim_Englund@lp.STIcomet.com Software Technology, Inc. La Plata, MD 301-934-5704 Fax: 301-934-5706 ________________________________________________________________________
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:56 CDT