procmail
[Top] [All Lists]

Re: inserting text and expanded variables in front of the body of msg

2001-02-15 07:55:18


On 15 Feb, Carlos Eduardo R. L. de Miranda wrote:
[...]

:0 B
* $
^Content-(Type|Disposition)*:${dotstar}name${ws}=${ws}${dq}.*${ext}${dq}
{
  SUBJ_=`formail -c -xSubject:`
  FROM_=`formail -c -xFrom:`
  TO_=`formail -c -xTo:`

  :0 fhw
  | cat - ; \
    echo "===== Filtered email - (stop.rc) ====="; \
    echo "Subject: $SUBJ_"; \
    echo "From   : $FROM_"; \
    echo "To     : $TO_"; \
    echo "======================================"

   :0
   ! rivellis(_at_)terra(_dot_)com(_dot_)br
}

The "!" forwards messages as they are. Try this out (beware I
didn't try it myself!)

:0 B
* $
^Content-(Type|Disposition)*:${dotstar}name${ws}=${ws}${dq}.*${ext}${dq}
{
  SUBJ_=`formail -c -xSubject:`
  FROM_=`formail -c -xFrom:`
  TO_=`formail -c -xTo:`

  :0 fhw
  | ( formail -I"rivellis(_at_)terra(_dot_)com(_dot_)br"; \
    echo "===== Filtered email - (stop.rc) ====="; \
    echo "Subject: $SUBJ_"; \
    echo "From   : $FROM_"; \
    echo "To     : $TO_"; \
    echo "======================================" )
    | sendmail -oi t
}


Hope it works.
--Rui

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>