procmail
[Top] [All Lists]

Re: Executing programs in a procmail script

2001-12-10 02:43:15
On Mon, Dec 10, 2001 at 08:55:02AM -0000, John Conover wrote:

In man procmailex, the following recipe is used to create a directory
named $MONTHFOLDER:

    :0 Wic
    * ? test ! -d $MONTHFOLDER
    | mkdir $MONTHFOLDER

Is the message piped to mkdir?

Is there a better way of executing a program without having the
message piped to it?

Lots of ways.  You can do things in backquotes, you can assign variables
whose contents are the stdout of a command line, etc.  If what you're
trying to achieve is to save a message in a folder named for the month,
there are a few options, but given that mkdir doesn't take any stdin,
piping the message to it is probably one of the less resource intensive
solutions.

Did you read the next example in procmailex?

Remember that procmail itself doesn't know how to create directories, so
anything that does that has to be an external command.

-- 
  Paul Chvostek                                             
<paul(_at_)it(_dot_)ca>
  Operations / Development / Abuse / Whatever       vox: +1 416 598-0000
  IT Canada                                            http://www.it.ca/

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail