procmail
[Top] [All Lists]

Re: a more complicated question:

1996-09-26 11:58:18
At 12:53 PM 9/26/96 -0500, yan(_at_)ns1(_dot_)wwisp(_dot_)com wrote:

[snip]
      I want to for every message comes from news(_at_)mci(_dot_)com to be 
stored in 
a local file, then I need to invoke a system perl script to operate on 
that file, how in the world would I do that?   


:0c: lockfilename
* ^From:(_dot_)news(_at_)mci(_dot_)com
archive_filename

:0a: lockfilename
| ( perlscript archive_filename ; rm archive_filename )


I don't happen to do anything like this, but I'm assuming this would do the
trick.  I'm also assuming that you don't really want the data file to linger
after the script runs (if you don't delete it, it'll end up containing ALL
messages processed by the recipe).

I'm far from a *NIX guru (nor do I have aspirations to be one), but I know
there is some way to actually pipe to a file inside the same recipe, so that
this doesn't need to be a two-parter -- I just don't know what that
construct would be.

Since you're operating on that datafile, the lockfile is important.  I'm
using an explicit lockfile name here (instead of the implicit, or
automatic), because I believe the implicit would be different between the
two parts of the recipe, thus allowing another message to come in and hose
you good.

Procmail Pros:  I'm at a loss for how you'd run a filter that wouldn't
bother passing the data on stdin - how would one accomplish this?

BTW - would you mind dealing with the leading and trailing blank lines in
your .sig, even if you don't shorten the .sig itself?  Thanks for the
consideration.

NetCruisers:  http://www.professional.org/pse/
Home of NCUtil, 3rd-party utility links (including Winsock), and FAQs!

 Sean B. Straw / Professional Software Engineering
 Post Box 2395 / San Rafael, CA  94912-2395
 Internet: PSE(_at_)professional(_dot_)org     CompuServe: 72210,521

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