procmail
[Top] [All Lists]

Re: Starting a perlscript...

1997-09-18 07:23:03
On Fri, 5 Sep 1997 14:22:08 -0700 (PDT),
"Aaron Dougherty (Sim Master)" <swsim(_at_)swsim(_dot_)com> wrote:
This is what I'm currently using. If anyone has a more efficient way,
please let me know. 

See below. Temp files are often a good sign that you're doing
something wrong, as I guess you realized. 

 | cat > $ABSOLUTE_PATH_TO_TEMP_FILE ; $ABSOLUTE_PATH_TO_CGI

Usually, the best way to write your programs is to let them accept
their input from stdin. Then you can say 

| $ABSOLUTE_PATH_TO_CGI

Putting the name of the program in a variable seems silly and
counterproductive, but perhaps you merely meant this as a
metavariable? 

Anybody could tell me how to launch a perl script with procmailrc?
... and passing along the FROM, SUBJECT, and CONTENT as parameters ?

The script can pick these out on its own. If it can't, perhaps you can
rewrite it. If you can't, it's certainly possible. 

by the way, if it's not too complicated, is there a way to split
the content of "FROM" in 2 parts? NAME and EMAIL ? (Like in FROM:
"'This is the name'" <This(_at_)is(_dot_)the(_dot_)e-mail>)

This is yet another way of asking, does Procmail do RFC822 parsing of
its input? The answer is no. If you're prepared to live with an
approximate solution, you might expect anything with an @ in it to be
the address and everything else to be "comments" (this is what RFC822
calls it -- it might contain other stuff than a real name). 

Hope this helps,

/* era */

-- 
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>

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