procmail
[Top] [All Lists]

Re: How do I get procmail to output an error message?

2002-07-20 20:14:23
Aleksey asked,

| Is is possible to get procmail to output something - not to the LOG
| file, but to stdout/stderr?

If you have not defined LOGFILE, stderr (including anything that would be
logged) goes to the inherited stderr.  Once you define LOGFILE, though, stderr
goes to the logfile, and if you thereafter unset or null out the value of
LOGFILE, stderr is closed.  You can't get the original stderr destination back
once you give it up.

Writing something to stdout is trickier; delivering to just "|" with no
command will write the message to stdout, but sending arbitrary text there is
something I've never heard of anyone trying.  What happens if you do this in a
procmail rcfile?

 :0ci
 | echo This is for stdout.

I guess the answer depends on your MTA (assuming we're talking about the
delivery of incoming mail rather than an interactive invocation of procmail
from a tty login).



_______________________________________________
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>