procmail
[Top] [All Lists]

Re: Request for new procmail flag (turn off logging for pipe)

2001-03-22 19:26:05
Awesome... however I had to tweak it a bit.  I tried using just the ':'
instead of ':0' (which I didn't even know was valid) and it just totally
didn't work.  When I left it as ':0' then it would return my message, but
also the body of the message.  So then I added the 'b' flag and now it
returns only the echo'd message.  Here's my final recipe:

  :0
  * $^TO${LOGNAME}-(bounce|bounce2)
  {
    EXITCODE = 100
    :0 fhbi
    | echo -n "Sorry, no mailbox here by that name. (#5.1.1) pm"
    :0
    |
  }

Thanks a lot!

Nate


On Thu, 22 Mar 2001, Philip Guenther wrote:

nate(_at_)lotech(_dot_)org writes:
Would it be possible to add a flag to specify that the output from the
pipe should not be logged if logging is on.  Right now I have the
following recipe:
...
 :0
 * $^TO${LOGNAME}-bounce
 {
   EXITCODE=100
   :0 c
   | echo "Sorry, no mailbox here by that name. (#5.1.1) pm" >&2
   :0
   /dev/null
 }

I run procmail under qmail-local, so qmail will mail back anything it
receives on STDERR.  However, I would like to have the logging option, but
if I turn it on then my error messages will get thrown in the log and not
in the bounce message from qmail.

I just looked at the qmail-local manpage and didn't see anything about
STDERR, but perhaps it does the same thing for output sent to STDOUT?
If so then the following, while ugly, should work:

      :0
      * $^TO_${LOGNAME}-bounce
      {
          EXITCODE = 100
          : fhi
          | echo "Sorry, no mailbox here by that name. (#5.1.1) pm"
          :0
          |
      }

(I agree, an easier way to send random output to procmail's original
stdout and stderr would be handy.)


Philip Guenther
Procmail Maintainer


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