procmail
[Top] [All Lists]

Re: procmail and formail

1996-02-15 10:42:03
Joe Voorhees asked,

| :0 hc
| * ? test $ON_VACATION = true
| * !^Subject:.*MATERIAL LIST XFER TO PIC
| * !^Subject:.*VENDOR TRANSFER NOTICE
| * !^Subject:.*FABRICATION PACKAGE TRANSFER
| * !^Subject:.*RELEASE FOR CHECK FILM
| * !^Subject:.*SUBMITTED
| LOG=| ($FORMAIL -r;\
|    echo $IM_NOT_HERE) | $SENDMAIL -t
| 
| As the man page says, this should've written to my LOGFILE. It
| didn't. But it DID activate the pipe in the recipe. So I think 
| my problem is:

The man page says that a variable capture recipe assigns the standard output
of the command to the variable.  Since you are repiping the output of formail
and echo to sendmail, sendmail sucks up the standard output of formail and
sendmail.  Sendmail itself does not write to standard output, so the stdout
of  ( $FORMAIL -r ; echo $IM_NOT_HERE ) | $SENDMAIL -t  is nothing.

Thus you're assigning a null string to $LOG, and when procmail writes $LOG
to the logfile you can't see a difference.

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