Sahil Tandon: > On Mon, 07 Sep 2009, Marcel Montes wrote: > > > I have a transport that pipes to a perl script. Everything is fine and > > dandy, but whenever the script fails the whole perl error message > > gets appended right after the failure_template message. > > > > I've checked bounce(5), bounce(8), and pipe(8), and although I admit > > that I haven't read thoroughly I haven't found anything in this regard. > > > > Of course the proper thing is to prevent all errors at the script level, > > but I'm in a sort of "live while developing" stage, so I would like to > > conceal the error message since no matter how careful you are, > > at times something does slip error catching efforts. > > > > Is there a way to do it? Did I miss something from the man pages? > > AFAIK, hiding the error output is not configurable. Concealing important > portions of the DSN seems silly and might even be a violation of RFC 3464 > (something you might or might not care about). But if you really wanted to > go this route, you could hack the way Postfix constructs a bounce message > and/or modify pipe(8) to not report back the nature of a script failure. I > know this is probably not the answer for which you had hoped, so good luck! > > Perhaps Wietse will have a more favorable reply. :-)
I have a suggestion. When the script fails, don't lose control and spill the guts all over the place. Instead, catch the error and report an appropriate response. If you don't know how to use Perl's built-in error catching facilities, wrap the Perl script in a shell script and use that as a diaper to absorb the mess. Wietse