Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have something like this in my Exim conf:

# a customized bounce handler
my_handler:
  debug_print = "R: ..."
  driver = redirect
  allow_defer
  allow_fail
  log_fail_output
  data = |/path/to/cmd
  pipe_transport = address_pipe
  file_transport = address_file
  no_more

The conf and the command both work fine. But if there's an error, I only get this line to mainlog:

[...] Child process of address_pipe transport returned 1 from command: /path/to/cmd

How can I log the stderr output of the command? (That is, the actual error message.) I looked at log_fail_output but that seems to be only for driver=pipe.

I'm running Exim 4.71 on an Ubuntu machine.

share|improve this question
1  
You could wrap the command in a shell script that handles your logging requirements and passes the exit code back up to exim. –  SmallClanger Jun 13 '13 at 7:09
    
@SmallClanger thanks, I'll consider that a possible workaround if no better option is found. :) But I'd rather have the error logged to mainlog, for convenience. –  tuomassalo Jun 13 '13 at 7:26
    
Ah, I thought you meant logging in general, rather than feeding it back to mainlog. I'm not sure that's possible. Of course you could have your shell wrapper append to mainlog directly, but I really wouldn't recommend that. :) –  SmallClanger Jun 13 '13 at 12:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.