procmail
[Top] [All Lists]

to modify the body

2001-02-27 08:36:32
I can't modify the body of the mail.
I some condition I can receive a mail with an email address in the first
line of the body.
In these case I would forward this mail to this address and to delete
the address in the body.


This is my .procmailrc .

:0
* ^From:(_dot_)*michele(_at_)ptnet\(_dot_)it(_dot_)*
{
   :0 B
    * [         ]*\/[^  ].*($|[         ]) #at this point I would to
capture the address, but I get all 
                                           #words in the first line.
                                           #e.g. if the first line is
pippo(_at_)ptnet(_dot_)it ciao 
                                           # I would have 
pippo(_at_)ptnet(_dot_)it
only in MATCH
    {
      :0 fbwc
       | sed -e 's/michele(_at_)ptnet(_dot_)it/$MATCH/';
      :0 fwhb
      | ( formail -r -I"From: torello(_at_)preplay(_dot_)it" \
                -I"To: michele(_at_)ptnet(_dot_)it" \
                -I"Subject: in TO ci va $MATCH ";  \
        ) \
      | $SENDMAIL -oi -t
      /dev/null
    }
    /dev/null
}

With this script michele(_at_)ptnet(_dot_)it receives the mail but without the
body.

Michele
_______________________________________________
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>