procmail
[Top] [All Lists]

Re: remove text from body and change subject and author

2005-01-12 08:58:00
Toen wij Fabian Braennstroem kietelden, kwam er dit uit:
* Michelle schrieb am 10 Jan 2005:

SUBJECT=|formail -xSubject: | sed -e 's,OpenFoam:\ Running\ /\
Solving\ /\ CFD:\ ,,gi' 

    :0hw
    FROM=|formail -I "" | sed -n -e '/By\ /p' |  sed -e 
's/^\(.\{0\}\).\{3\}\(.*\)/\1\2/'|  sed -e 
's/^\(.\{10\}\).\{30\}\(.*\)/\1\2/'  

Is that a delivering recipe? I don't think so, because a 
similar example is in 'man procmailex':
  :0 h
  KEYWORDS=| formail -xKeywords:
But if it is, then the next recipe will not be reached.

The :0h limits what is passed to the header, so 
I assume that formail -I "" has nothing to work on.


    :0 fhw
    | formail -i "From:$FROM"


As I understand it, all of the formail/sed-juggling above 
can easily be done with some procmail-code followed by a 
single call of formail (so not a single sed-call is needed 
at all).

-- 
Grtz, Ruud

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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