procmail
[Top] [All Lists]

Re: STDOUT output?

2002-12-13 16:58:20

Thanks again David.

So the "LOG=" can only be used for stderr? Your example worked, thanks!

My intent is just as you mentioned. A program would be executing procmail 
with -m and would be expecting some sort of response; that way procmail
can do whatever it needs, and the calling program would have knowledge of 
what kind of action was taken.

Is it too cumbersome to have multiple "echo" sections? What I mean is, I
might want to place an echo in each action block, to report to the
calling program.

Ricardo

On Fri, 13 Dec 2002 11:13:35 -0600 "David W. Tamkin" wrote:

Ricardo continued,

| As a matter of fact, I am running in -m mode. Thank you :-)
|
| As a very simple test I created an rcfile like this:
|
| DEFAULT=|
|
| :0
| | echo "TEST"
|
| In the hopes to get "TEST" on STDOUT.

No, that's not the way to do it.  If you're trying to get static text to
stdout, it's not so easy.

 LOG="TEST
"

will write "TEST<newline>" to stderr, and if you haven't defined a
LOGFILE,
stderr will point where the parent's stderr did.

| Unfortunately, that didn't work. Am I missing something?

I was missing something.  I thought you wanted to write the message
to stdout.
That isn't what you asked.

So let me make sure I understand:  while you're piping procmail -m to some
other process, you want procmail, at some point as it goes through
the rcfile,
to send some other text to stdout.  You don't want to send it
together with
the message nor instead of the message, but separately from it.  This 
is the
only way I can think of to do that at any arbitrary point in the rcfile
separately from the message:

 :0c # Let us clone.
 {
  :0fbi
  | echo TEST
# if there is no /bin/echo, use
# | echo TEST;

  :0br
  |
 }

It's ugly as sin, but it worked when I tried it.  Also, it doesn't require
setting DEFAULT to "|", just using -m.


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