Andrew Beverley:
> On Mon, 2015-06-01 at 14:24 -0400, Wietse Venema wrote:
> > Andrew Beverley:
> > > So, is there a way to either change the return-path for all external
> > > commands, or alternatively set a higher log level for any errors?
> > 
> > If the error happens in the external command, then you could configure
> > the pipe(8) daemon to run the command under strace and capture
> > strace output to file.
> > 
> > But, the pipe(8) daemon command-line syntax has limited options,
> > and it may be more convenient to configure pipe(8) to invoke a shell
> > script that straces the command.
> > 
> > #!/bin/sh
> > mkdir -p /tmp/pipe-debug
> > strace -o /tmp/pipe-debug/strace.$$ /your/command "$@"
> 
> Thanks Wietse. The external commands are all Perl scripts, and I'm only
> really interested if they have a bad exit status. Therefore, the best
> thing might be to do something similar to the above, but log the error
> somewhere that I will notice it (or maybe even use a Perl "wrapper"
> script that deals with any exceptions)?

Postfix already logs the script's output (stdout and stderr) streams,
and it already logs and reports a non-zero exit status.

        Wietse

Reply via email to