Re: [EXIM] Validating pipe return codes

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: David M Walker
CC: Exim Users Mailing List
Tárgy: Re: [EXIM] Validating pipe return codes
On Sun, 7 Feb 1999, David M Walker wrote:

> I am successfully running a filter with the following line:
>
> unseen pipe "/monza/clients/datamgmt.com/users/filemgr/fextract.pl"
> logwrite "$tod_log User $reply_address ..."
>
> Unless there is an unusual error this command nearly always
> succeeds, and writes a log message into the log file,
> when it doesn't the user gets bounced a message saying its
> been rejected, but the log file does not know that its been
> bounced and still logs a message.
>
> I therefore would like to test the return code of the pipe
> command - how can I do this ?


You cannot. The pipe is not run at filtering time. If you want to run
pipes and check their return codes, then you have to do something
entirely different, which is to run the pipe at delivery time. In other
words, you have to set up delivery to a pipe which itself runs your
"real" pipe and checks the return codes, etc. One common way that people
do this is to make use of procmail.


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



--
*** Exim information can be found at http://www.exim.org/ ***