IT WORKS...perfectly!!!! Thank you so much!
______________________________ Reply Separator _________________________________
Subject: Re: Re[2]: Pserving FROM when forwarding
Author: guenther(_at_)gac(_dot_)edu at INTERNET
Date: 4/28/97 4:13 PM
Alex_Willis(_at_)hphc(_dot_)org writes:
Thanks for the explanation. I guess my question becomes, what would my
recipe (below) look like if it nukes the FROM field?
The system that is using the FROM field instead of FROM: is Lotus'
Message Switch (AKA: LMS, EMX, SoftSwitch, which is also broken in
other ways). I don't know _why_ it uses it, but for example...this
message that you sent, appears to be from
awillis(_at_)shell3(_dot_)ba(_dot_)best(_dot_)com
instead of guenther(_at_)gac(_dot_)edu
Ah, the joys of broken software...
In order to pass on the envelope sender value, you'll need to capture
the current value, then pass the '-f' flag to sendmail to set it on
the outgoing message:
# Use de Morgan's laws to get a shortcircuted 'OR' operation here.
:0
* ! ^Return-Path: *\/[^ ]+
* ! ^From *\/[^ ]+
{ }
:0 E
{ ENVFROM = $MATCH }
FROM=`formail -rtxTo:`
:0
*^TOawillis
| formail -i"To:alex_willis(_at_)hphc(_dot_)org" \
-i"From: $FROM" | $SENDMAIL -f "$ENVFROM" -oi -t
:0
*^TOwalkman
| formail -i"To:walkman(_at_)shell4(_dot_)ba(_dot_)best(_dot_)com" \
-i"From: $FROM" | $SENDMAIL -f "$ENVFROM" -oi -t
Philip Guenther