Hi all,
I am attempting to build a recipe on bouncing email
back to the sender depending on a certain condition.
Below is the logic I have:
if (pattern) is found in FILE
then remove body, append FILE to body and
bounce mail back to sender
else remove body, append FILE to body and
forward it to <some(_at_)newaddress(_dot_)com>
below is what I have so far:
:0
{
#IF PATTERN FOUND IN FILE THEN REMOVE ORIGINAL BODY,
#APPEND FILE TO BODY AND BOUNCE MSG TO SENDER
:0
|perl -ple 'open(FH, "/path/to/fileA");
while(<FH>) { if ($_ =~ "pattern") {HAVE PROCMAIL
APPEND fileA TO BODY AND BOUNCE MSG BACK TO SENDER
}
#ELSE REMOVE BODY, APPEND FILE TO BODY AND FORWARD ON
#TO NEW ADDRESS:
:0 fbw
| cat > /dev/null
:0 fbw
|cat - /user/mlamtest/.procmail/rt.out
:0
! xxx(_at_)yyy(_dot_)com
}
thanks
__________________________________________________
Do You Yahoo!?
Send online invitations with Yahoo! Invites.
http://invites.yahoo.com