procmail
[Top] [All Lists]

Re: Bouncing messages (was Re: Uses for HOST in procmailrc???)

1996-01-21 06:14:40
David Mazieres <dm(_at_)amsterdam(_dot_)lcs(_dot_)mit(_dot_)edu> wrote:
After reading through the source again (3.11pre3), I begin to recall
that this has come up before, and the answer then was "once you set
LOGFILE, you can't get to stderr ever again".  The workaround (as

LOGFILE.  I still think this is a bug, or at least 'non-optimal behaviour',
but as I can't think of any particularly elegant ways to have procmail
do otherwise, I haven't complained very loudly.

I commented out the LOGFILE line, and this works.  Unfortunately, I
would really like to be able to log mail messages.

Any comments?  Any possibility of getting this or a more elegant
solution into procmail?

Stderr is unreachable after an assignment to LOGFILE (unless you clone
procmail before that).

However, stdout is still available.  And, as it happens, sendmail treats
stdout and stderr the same.  Anything that comes out of stdout is put
in the bounce message as well.

Use a recipe like:

        :0
        |

To dump the current message to stdout.

To get intermediate texts out without destroying the message in the
procmail buffer use:

        :0 c
        {
                :0 f
                | echo "Some text you want in the response"

                :0
                |
        }
-- 
Sincerely,                                                          
srb(_at_)cuci(_dot_)nl
           Stephen R. van den Berg (AKA BuGless).

You should use contraceptives at every conceivable occasion.