procmail
[Top] [All Lists]

Re: easy question

1997-07-25 09:33:00

Sam Fleitman <samf(_at_)dallas(_dot_)net> wrote:
 I've got what seems like should be an easy question:
I want to send the 'From' line of all email messages to a script.

 How do I do that?
 Thanks in advance for any suggestions...

What did you try?

Be sure to look through the man pages of both:
  procmailrc, and
  procmailex


:0hic
|formail -z -X 'From ' |/some/script

  or with locking

:0hic:.script$LOCKEXT
|formail -z -X 'From ' |/some/script

  or with sed

:0hic:.script$LOCKEXT
|sed -e '/^From /q' |/some/script

  or have your script look for the 'From ' line itself it
  it's in a decent language.

:0hic:.script$LOCKEXT
|/some/script

  or do the From_ grab in procmail and pass it to the script
  if you might want it later in the procmailrc.

:0h
* ^\/From .*
{ FROM=$MATCH }
:0ahic:.script$LOCKEXT
|(echo "$FROM" | /some/script)


____________________________________________________________ Philip Kizer ___
Texas A&M CIS Operating Systems Group, Unix ( 409.862.4120 ) 
pckizer(_at_)tamu(_dot_)edu

<Prev in Thread] Current Thread [Next in Thread>
  • easy question, Sam Fleitman
    • Re: easy question, Philip Kizer <=