procmail
[Top] [All Lists]

Re: stdout

2002-06-29 09:25:45
Heiko asked,

|   Where do I find the stdout of scripts that are executed e.g.:
|
|   :0
|   | cat
|
|   This should send the mail to stdout.  But where can I find it?

Procmail inherits stdout from whatever process invoked procmail.  On incoming
mail, where procmail is called as the LDA or from a .forward, stdout usually
is closed, so it vanishes if you don't redirect it.

|   What about stderr?

When procmail starts, stderr is also inherited until you set the LOGFILE
variable and then, if $LOGFILE is writable, stderr goes there.  If you have
set LOGFILE and then unset it, stderr is closed.

|   Is there a way to include this information in the logfile?

If $SHELL is sh or sh-compatible, put    >&2   onto the command.  If $SHELL is
csh or csh-compatible, I don't know.  Either way, a shell will be involved,
and you'll have to have defined a logfile already.

BTW, procmail can deliver to stdout without calling cat:

 :0
 |

with no command after the pipe symbol, but that's useful only when stdout goes
somewhere.



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

<Prev in Thread] Current Thread [Next in Thread>
  • stdout, Heiko . Scheit
    • Re: stdout, David W. Tamkin <=