procmail
[Top] [All Lists]

extractions

1999-09-10 23:02:11
  I'm playing around with the following trying to create a bounce list of
emails of authors which my rules denote as spam so that in the event that
I get another from them I can have it deleted without going through the
rest of my filters.

:0
* ^Subject:.test-header-extraction
{
   FROMLINE=`formail -xFrom:`

   :0f
   | formail -bfA "X-Header-From: ${FROMLINE}" | \
             echo ${FROMLINE} >> ${PMDIR}/rc.bounceList
}

  This does extract the email address and places it into the file,
unfortunately it blows out the message itself and kills my Inbox. I have a
feeling it has something to do with the | before the echo but I'm unsure
of how exactly it should be.
  The other thing I want to do is remove all the other crap in the line,
for example, mine shows up as    S.Toms <tomas(_at_)primenet(_dot_)com>   and 
the
whole line goes into the file, how can I make just the 
tomas(_at_)primenet(_dot_)com
goto the file?

-- 
     S.Toms - tomas(_at_)primenet(_dot_)com - http://www.primenet.com/~tomas
                S.u.S.E. Linux v6.1+ - Kernel 2.2.11

An age is called Dark not because the light fails to shine, but because
people refuse to see it.
                -- James Michener, "Space"

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