Re: [exim] Alias-Error to /dev/null

Pàgina inicial
Delete this message
Reply to this message
Autor: Magnus Holmgren
Data:  
A: exim-users
Assumpte: Re: [exim] Alias-Error to /dev/null
On Tuesday 12 December 2006 16:35, Mail(at)charliesangels.biz wrote:
> our /etc/aliases contains an Alias that is piped to a script:
>
> bla: "|/path/to/script.pl"
>
> Sometimes this script produces an error. sometimes....
> Unfortunately a fix (which would be the best solution) is not the easiest.
> Is there any way to pipe a possible error message to /dev/null ?
>
> I tried
>
> bla: "|/path/to/script.pl 2> /dev/null"
>
> but now all output is send to /dev/null, but only possible errors should
> land there.


I suppose you have use_shell set on your pipe transport, otherwise it won't
work at all. Now, only output sent to stderr should be redirected
to /dev/null. But of course, the system can't know if that output contains
anything that isn't an error message.

That said, I think you might want to have a look at the return_output and
return_fail_output options of the pipe transport. Whatever the script
outputs, Exim takes care of it and what Exim does depends on these options,
as well as the exit status of the script, of course. By default, both are
false, meaning that the output isn't used, so it isn't completely clear what
you really want to accomplish.

-- 
Magnus Holmgren        holmgren@???
                       (No Cc of list mail needed, thanks)


"Exim is better at being younger, whereas sendmail is better for
Scrabble (50 point bonus for clearing your rack)" -- Dave Evans